ASP to dll to Informix Puzzler
Posted in 1999
Topics: Connectivity: ODBC / JDBC / .NET, Networking & sqlhosts Configuration, Internationalization & Character Sets
Hi, Not sure if anyone has come accross this before... System stuff: NT Server4.0/IIS4.0/VB6 with ADO/Visual InterDev6.0/Intersolv Informix3.11driver/Informix5 DB on UNIX (Dynix) box. **** I have an VB6 ActiveX dll that connects to an Informix Database via ADO and retrieves some info. When I call this dll via a stand alone exe everything works fine. However, when I call the dll from an active server page, the connection fails - it can't open the connection! Exactly the same code, and all database connection done in the dll. The ASP has no input to the making of the connection. Here's my original connection string contained in the dll dbConn.ConnectionString = "ODBC;DATABASE=myDB;UID=myUser;PWD=myPwd;DSN=myDSN" works fine when called by an exe but fails when called from an ASP. As VB appears to make some interpretations of this connection string I also tried its interpretation dbConn.ConnectionString = "Provider=MSDASQL.1;Connect Timeout=15;Extended Properties='DSN=myDSN;UID=myUser;PWD=myPWD;DATABASE=myDB;HOST=myHost;SERV=sq lexec;SRVR=myServer;PRO=onsoctcp';Locale Identifier=1033" works fine called by an exe but fails when called from an ASP. and then to make sure quotes weren't the problem dbConn.ConnectionString = "Provider=MSDASQL.1;Connect Timeout=15;Extended Properties=" & Chr(34) & "DSN=myDSN;UID=myUser;PWD=myPWD;DATABASE=myDB;HOST=myHost;SERV=sqlexec;SRVR= myServer;PRO=onsoctcp" & Chr(34) & ";Locale Identifier=1033" works fine called by an exe but fails when called from an ASP. But I still get the same old error -461 (File Open Error) What am I missing??? permissions? references? (the dll is referenced within the VizInterdev (ASP) project. Has anyone seen this or can anyone give me an explanation of why the internal workings of an ActiveX dll differ accoring to what application/environment calls it? Thanks, John
First try the simple ASP page and test it can access the Informix Database, I guess you can't. It is the problem of permission on ASP page, you have to configure the settings on NT Server to let it work properly with Informix Database Server. I have this problem for a long time and get the solution recently by my self of course some information from this news group. I have call informix engineers for help from our contury, but they told us NT and ASP is not stable not the answer of the problem! John Clynes <jclynes@family.co.uk> wrote in message news:7m50e3$3va$1@grind.server.pavilion.net... > Hi, > Not sure if anyone has come accross this before... > > System stuff: > NT Server4.0/IIS4.0/VB6 with ADO/Visual InterDev6.0/Intersolv > Informix3.11driver/Informix5 DB on UNIX (Dynix) box. > **** > I have an VB6 ActiveX dll that connects to an Informix Database via ADO and > retrieves some info. > When I call this dll via a stand alone exe everything works fine. > However, when I call the dll from an active server page, the connection > fails - it can't open the connection! > Exactly the same code, and all database connection done in the dll. The ASP > has no input to the making of the connection. > > Here's my original connection string contained in the dll > dbConn.ConnectionString = > "ODBC;DATABASE=myDB;UID=myUser;PWD=myPwd;DSN=myDSN" > works fine when called by an exe but fails when called from an ASP. > > As VB appears to make some interpretations of this connection string I also > tried its interpretation > dbConn.ConnectionString = "Provider=MSDASQL.1;Connect Timeout=15;Extended > Properties='DSN=myDSN;UID=myUser;PWD=myPWD;DATABASE=myDB;HOST=myHost;SERV=sq > lexec;SRVR=myServer;PRO=onsoctcp';Locale Identifier=1033" > works fine called by an exe but fails when called from an ASP. > > and then to make sure quotes weren't the problem > dbConn.ConnectionString = "Provider=MSDASQL.1;Connect Timeout=15;Extended > Properties=" & Chr(34) & > "DSN=myDSN;UID=myUser;PWD=myPWD;DATABASE=myDB;HOST=myHost;SERV=sqlexec;SRVR= > myServer;PRO=onsoctcp" & Chr(34) & ";Locale Identifier=1033" > works fine called by an exe but fails when called from an ASP. > > But I still get the same old error -461 (File Open Error) > > What am I missing??? permissions? references? (the dll is referenced within > the VizInterdev (ASP) project. > > Has anyone seen this or can anyone give me an explanation of why the > internal workings of an ActiveX dll differ accoring to what > application/environment calls it? > > Thanks, > John > >