Dear all,
In the last days, I am trying to connect to my Informix DB
with ASP. I am using Adobe Dreamweaver CS3. For this reason, I
installed Informix ODBC Driver connect.2.90.TC6.WIN in our Server,
which is the Web Server of my Web Site. Furthermore, I added the
following rows:
1. in hosts file: 172.25.30.20 cwm2 (Name of the Informix
Server).
2. in services file: atm_service 33179/tcp (the service,
which communicates with Informix Server).
I created a Data Source (with name=atm) in Web Server with
successfull connection with Informix DB.
Furthermore, I created 2 asp pages, which have the following
code:
db.asp
<%
xDb_Conn_Str =
"Provider=Ifxoledbc.2;password=<pwd>;User ID=<user
name>;Data Source=<Informix Database name>@<Informix
Server name=cwm2>;Persist Security Info=true;"
xDb_Conn_Str_Ora_Blob =
"Provider=Ifxoledbc.2;password=<pwd>;User ID=<user
name>;Data Source=<Informix Database name>@<Informix
Server name=cwm2>;Persist Security Info=true;"
%>
test.asp
<%@ CodePage = 28597 LCID = 1032 %>
<%
Response.expires = 0
Response.expiresabsolute = Now() - 1
Response.addHeader "pragma", "no-cache"
Response.addHeader "cache-control", "private"
Response.CacheControl = "no-cache"
%>
<%
<!-- Initialise -->
ewCurSec = 0
<!-- User levels -->
Const ewAllowAdd = 1
Const ewAllowDelete = 2
Const ewAllowEdit = 4
Const ewAllowView = 8
Const ewAllowList = 8
Const ewAllowReport = 8
Const ewAllowSearch = 8
Const ewAllowAdmin = 16
%>
<!--#include file="include/db.asp"-->
<%
<!-- Open connection to the database -->
Set conn=Server.CreateObject("ADODB.Connection")
conn.ConnectionString = xDb_Conn_Str
conn.Open
<!-- Build SQL -->
sSql = "SELECT count(*) FROM svplus_card;"
Response.Write sSql
' Set up Record Set
Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorLocation = 3
rs.Open sSql, conn, 1, 2
Response.Write rs.RecordCount
%>
Unfortunately, I cannot connect with Informix DB and I get
the following error:
error '80040e14'
I wonder if you could help us.
Thank you very much.
Giorgos Baliotis (gbaliotis@cosmote.gr)