Creating ODBC data source programmatically
Posted in 2000
Topics: Connectivity: ODBC / JDBC / .NET
I want to create an ODBC data source programmatically for "INFORMIX 3.30 32 BIT" [VB code] SQLConfigDataSource(UsrWizard.hWnd, ODBC_ADD_DSN, "INFORMIX 3.30 32 BIT", strAttributes) where "strAttributes" contains attribute-value pair of DSN, UID, PWD, SERVER, DB etc. I pass the "hWnd" to check the attributes received by the odbc driver. I get a "dialog" from the driver where I see almost all attributes except the "DSN". ((How can I contact the developers of the Informix ODBC driver?)) (byju)
I have discovered my mistake after reading the "Informix ODBC Driver Programmer's Manual". The "Figure 2-1 Required DSN Values" gives a list attributes to be used during "SQLConfigDataSource" call. After including all those attributes e.g. Protocol,HostName,Service etc. (in the strAttribute variable), I could create a DSN programmatically. Bye Byju