ADO connection ctring for Intersolv 3.11 ODBC driver
Posted in 1999
Topics: Connectivity: ODBC / JDBC / .NET
Hi Informixers, I'm trying to follow Microsoft's advice to configure a connection string for ADO without using a DSN. For that, I need the setting for the "driver" parameter. In the Microsoft Press "Data Access Handbook for VB 6.0" there is an example for SQL Server (what else...), where "SQLServer" is used. What do I put here for the Intersolv 3.11 ODBC driver for Informix, which is included on the IDS CD-ROM? If this is a RTFM question, what FM should I look into? Regards, Richard -- +--------------------------+------------------------------------------+ | Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de | | EDV-Gruppe Anaesthesie | Tel : +49-89-7095-6110 | | Klinikum Grosshadern | FAX : +49-89-7095-6420 <-- NEW!!! | | 81366 Munich, Germany | GSM : +49-172-8933578 | +--------------------------+------------------------------------------+
Richard Spitz wrote: > I'm trying to follow Microsoft's advice to configure a connection string > for ADO without using a DSN. For that, I need the setting for the > "driver" parameter. Found it myself. Here is the connection string that works for me: "DRIVER={INTERSOLV 3.11 32-BIT INFORMIX9};DB=xxxxxx;HOST=xxxxxx;" & _ "SERV=sqlexec;SRVR=xxxxxxx;PRO=onsoctcp;UID=xxxxxxx;PWD=xxxxxxx" (Insert your own values for database name, hostname, name of Informix instance, user and password) Regards, Richard -- +--------------------------+------------------------------------------+ | Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de | | EDV-Gruppe Anaesthesie | Tel : +49-89-7095-6110 | | Klinikum Grosshadern | FAX : +49-89-7095-6420 <-- NEW!!! | | 81366 Munich, Germany | GSM : +49-172-8933578 | +--------------------------+------------------------------------------+
Unfortunately I'm working with Informix too. I don't use the same driver but the Connection String should be the same. I declare these Constants in the module that contains my connection procedure: Private Const SERVER = "MyServer" Private Const DB = "MyDatabase" Private Const DRIVER = "INTERSOLV InterBase ODBC Driver (*.gdb)" Then in my connection routine I set these Connection object properties and call the open method: With cnPerf .ConnectionString = "driver={" & DRIVER & "};server=" & SERVER & ";uid=" & txtUser.Text & ";pwd=" & txtPassword.Text & ";database=" & DB .ConnectionTimeout = 5 .Open End With If cnPerf.State = adStateOpen Then ''Do something with the connection Of course the ConnectionString property is continuous(on one line). And I use the State property to check to see if I'm connected. And I trap for errors extensively because the driver I'm using isn't worth a cup of toejam. And I pull the pwd and uid information from a modal login form. Note that for other drivers you can figure out there name by going into the Data Environment Designer and setting up a new connection object w/a new File Data Source. When you are prompted for the driver highlight the one you want to know the name for click the advanced button. Hope this helps, Chris. In article <3768C415.2E9342CE@ana.med.uni-muenchen.de>, richard.spitz@ana.med.uni-muenchen.de wrote: > Hi Informixers, > > I'm trying to follow Microsoft's advice to configure a connection string > for ADO without using a DSN. For that, I need the setting for the > "driver" parameter. > > In the Microsoft Press "Data Access Handbook for VB 6.0" there is an > example for SQL Server (what else...), where "SQLServer" is used. What > do I put here for the Intersolv 3.11 ODBC driver for Informix, which is > included on the IDS CD-ROM? > > If this is a RTFM question, what FM should I look into? > > Regards, Richard > -- > +--------------------------+------------------------------------------ + > | Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de | > | EDV-Gruppe Anaesthesie | Tel : +49-89-7095-6110 | > | Klinikum Grosshadern | FAX : +49-89-7095-6420 <-- NEW!!! | > | 81366 Munich, Germany | GSM : +49-172-8933578 | > +--------------------------+------------------------------------------ + > Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.