Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Connecting Informix Database with ASP

New Here ,
Aug 27, 2007 Aug 27, 2007

Copy link to clipboard

Copied

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)
TOPICS
Server side applications

Views

1.2K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 27, 2007 Aug 27, 2007

Copy link to clipboard

Copied

www.connectionstrings.com


"gbaliotis" <webforumsuser@macromedia.com> wrote in message
news:faup0h$3f9$1@forums.macromedia.com...
> 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)
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 28, 2007 Aug 28, 2007

Copy link to clipboard

Copied

I have seen this site: www.connectionstrings.com and unfortunately I cannot solve my problem.

I would be very grateful if you could give me some steps, in order to succeed this connection (Informix - ASP).

1. Is there any problem with a connection of ASP and Informix generally?
2. Do I have to state the path where my DSN is located in our Web Server?

Don't forget that our Web Server is a Windows based Server (Win 2000) and our Informix DB is installed in a Solaris Server.

Thank you very much.

Giorgos Baliotis

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 28, 2007 Aug 28, 2007

Copy link to clipboard

Copied

LATEST

"gbaliotis" <webforumsuser@macromedia.com> wrote in message
news:fb1ain$1fb$1@forums.macromedia.com...
>I have seen this site: www.connectionstrings.com and unfortunately I cannot
> solve my problem.
>
> I would be very grateful if you could give me some steps, in order to
> succeed
> this connection (Informix - ASP).
>
> 1. Is there any problem with a connection of ASP and Informix generally?

Probably not; any ODBC or OLE-DB data source should be able to communicate
via ADO with your ASP pages.
I have not used Informix, though, so I don't know of any requirements on
that end (such as enabling certain protocols, etc).

> 2. Do I have to state the path where my DSN is located in our Web Server?

The DSN name should be sufficient. Be sure you're using a system DSN and
not a user DSN.


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines