Re: ASP/IIS connect to Informix
Posted in 2004
Topics: Connectivity: ODBC / JDBC / .NET, Security, Permissions & Auditing, Platform-Specific Issues, Versions, Editions & End-of-Life
Most likely some settings you have done in setnet32 (stored in registry) are needed. IIS runs in the context of IUSR_machinename unless the user is authenticated; then it runs in the context of the actual user. Change you connection string to include server name, database name etc instead of a DSN. Something like this (but this one is for the 2.81 odbc driver so it may not be exactly the same for the version you are using): Driver={INFORMIX 3.81 32 BIT};Host=hostname;Server=ifxservername;Service=ifxservicename;Protocol=olso ctcp;Database=dbname;UID=informixuser;PWD=password Also, if you get a lot of hits on your server - good luck as the IFX ODBC (and OLEDB) providers are leaky and unstable crap. You may want to have some kind of demon on your db server that cleans up zombie connections and transactions and locks left behind for days after a connection has been terminated... Or a daily reboot may be in place... "?L???V" <junedong@mail.chimei.org.tw> wrote in message news:3a49c3f1.0405260220.74957e1a@posting.google.com... > We have Windoes 2000 server with IIS 5.1 and using ASP programs to > connect the Informix database IDS 9.4 in IBM AIX machine. But we keep > getting such error messages: > > Micorsoft OLE DB Provider for ODBC DRivers (0x80004005) > [Informix][Informix ODBC Driver]General error. > /where/the/AP/is/program.asp, line 76 > > line 76 of the ASP is as follows where try to do open task: > 75 set conn=Server.CreateObject("Adodb.Connection") > 76 conn.open "dsn=DSN;uid=UID;pwd=PWD;database=DATABASE" > > We have tried the Informix Client SDK 2.5 and 2.7, both get the same > error. What confused us is when such error happens, we get OK status > by using Informix ODBC Apply & Test Connection and DBPing is ok. At > the same time, ASP still works fine to connect to SQL Server. Only ASP > program fail! > > Thanks for any comment!
Clarification re the registry thing: some settings are stored in registry under HKEY_CURRENT_USER. Ie they are for the current user only. So if you do the setnet stuff as administrator, these settings are not available for IUSR_machinename or impersonated normal users.