Hello,
I want to connect to an Oracle 9.2 database from a web site.
- I have created a DSN file, I access the database from Excel
- I have written the following vbScript, that works:
I tried to connect to an SQL Server database using the same method, that works.
I have read/write rigths on the DSN file (it is placed in web site directory)
Can somebody help me, please?
Thanks in advance
I want to connect to an Oracle 9.2 database from a web site.
- I have created a DSN file, I access the database from Excel
- I have written the following vbScript, that works:
Code:
dim rs
Dim connString
Dim conn
Dim SQL
set conn = createobject("ADODB.Connection")
Const DSN = "MonDSN"
Const UserID = "MonUID"
Const Password = "MonMdP"
connString="dsn=" + DSN + ";uid=" + UserID + ";pwd=" + Password + ";"
conn.open connString
set rs = conn.execute ("select * from toto")
msgbox(rs.eof)
conn.close
- I have adapted it in ASP:
<html>
<body>
<%
dim rs
Dim connString
Dim conn
Dim SQL
set conn = createobject("ADODB.Connection")
Const DSN = "MonDSN"
Const UserID = "MonUID"
Const Password = "MonMdP"
connString="dsn=" + DSN + ";uid=" + UserID + ";pwd=" + Password + ";"
conn.open connString
set rs = conn.execute ("select * from toto")
response.write(rs.eof)
conn.close
%>
I have the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC driver for Oracle][Oracle]Error while trying to retrieve text for error ORA-12158
I have read/write rigths on the DSN file (it is placed in web site directory)
Can somebody help me, please?
Thanks in advance
Comment