Informix via Active Server Pages
Posted in 1997
Topics: Stored Procedures & SPL, Connectivity: ODBC / JDBC / .NET, Internationalization & Character Sets
Question: I am writing an web application in ASP that displays simple reports pulled from an informix database. I'm using NT Workstation currently, and MS Visual InterDev to develop the ASP. I'm also using the 7.2 Informix-CLI ODBC driver. Here's my problem: Visual Interdev, MS Query, Impromptu, etc all can connect to the Informix DB without problems, using the ODBC driver/DSN that I have set up. However, when I try to open a connection to the database using ASP, I receive the following server-generated error message: Microsoft OLE DB Provider for ODBC Drivers error '80004005' [INTERSOLV][ODBC Informix driver][Informix]Unable to load locale categories. /prereport.asp, line 9 The Informix error info claims this is caused by an invalid value for CLIENT_LOCALE, DB_LOCALE, or INFORMIXDIR. I know INFORMIXDIR is correct, not so sure what the Locale's should be, but I've set them to en_us.1252, which is supposedly the windows locale. At any rate, since the same DSN is used for ASP connections(which get the above error) as for MS Query connections(which work fine), I don't know what the problem can be. My ASP code(vbscript) is: sql="select * from product where prd_prd_id = '" & product_no & "'" response.write(sql) set RS_CPOHEADER = Server.CreateObject("ADODB.RecordSet") RS_CPOHEADER.Open sql,"DSN=systemDSN;UID=myUID;PWD=myPWD", 3,3 ' Alternate attempt, same result: ' Set objConnect = Server.CreateObject("ADODB.Connection") ' objConnect.Open Session("ConnectionString"), "myUID", "myPWD!" It is a system DSN, not file or user. The UID/PWD used is for a fully-privileged unix account. Has anyone else run into a similar problem and know of a fix? I've been stuck because of this error for a couple of days now... Thanks, Steve