RE: Problem connecting via ADO
Posted in 2003
You can also connect via OLE-DB instead of ODBC if your database is setup for it. I am not sure if the connect utilities come with the ole-db driver, I use the CSDK package. I configured setnet32 using instructions below before creating the apps so if setnet not configured, you may need more options defined in your string. I too am somewhat new to Informix and played around with the connection string until my app connected. I use this connection string for my VB app and .asp pages. sConnString = "Provider=ifxoledbc;data source=" & sDB & "@" & DBHost & ";User ID=" & DBUser & ";Password=" & DBPassword (note: datasource is in the form of "dbname@instancename", I just have variables for both as I have multiple DB's within the same instance, I could have hard coded my instance name) Randy -----Original Message----- From: Sathyanesh Krishnan [mailto:satyan@us.ibm.com] Sent: Thursday, July 31, 2003 4:11 PM To: phil@lawbase.com Cc: informix-list@iiug.org; owner-informix-list@iiug.org Subject: Re: Problem connecting via ADO Hi Phil, It looks like the client configuration (connection to the server) is not proper. You need to get it done first. The following steep may help you to do that. By using SetNet32 tool : 1) From the SetNet tool, Click the “Server Information” tab. Fill up the information One of the entries is “Service Name”, you can either give the Service Name or the port number for the server itself. If you don’t remember the port number you can get it from the file \\WINNT\\system32\\drivers\\etc\\services (During the server installation, it would have made the entry) Once you complete all the entry then 2) Select the “Host Information” tab It would have already selected the “current host” for you Then fill up a valid user name In the “password option” list box chouse “Password” Then in the “Password” text box give the password for the user. Press OK. Now your client is configured for connecting to the server. The other option is to provider all this connection information in the connection string to the VB ADO application itself. In this case you don’t need a DSN. Here is a sample connection string for a VB ADO application You may edit this according to your server information. ConnStr = "Provider=MSDASQL; DRIVER={INFORMIX 3.82 32 BIT}; " & _ "DB=DataBasName; HOST=HostName;" & _ " SRVR=ServerName; SERV=9400; PRO=onsoctcp; " & _ " UID=UserName; PWD=Password; " I am assuming you are using the latest Informix Connect; if not the DRIVER option will change. Let me know if you still have any problem. Regards, Satyan. |---------+----------------------------> | | phil@lawbase.com | | | (Phil Homburger) | | | Sent by: | | | owner-informix-li| | | st@iiug.org | | | | | | | | | 07/31/2003 12:36 | | | PM | | | Please respond to| | | phil | |---------+----------------------------> >--------------------------------------------------------------------------- ----------------------------------------------------| | | | To: informix-list@iiug.org | | cc: | | Subject: Problem connecting via ADO | >--------------------------------------------------------------------------- ----------------------------------------------------| All - I'm an Informix newbie trying to ultimately use ADO in a small VB app to extract data from an Informix database running on NT. I've downloaded & installed the latest Informix Connect utilities. I ran the setnet32 program but when I try to create the ODBC DSN I get an 'Unspecified error -11356' followed by 'Unspecified system error -23101' whenever I try to Apply & Test the entry. What am I missing? Thanks in advance. - Phil Homburger phil@lawbase.com 303-320-7798 sending to informix-list sending to informix-list