[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 413
  • Last Modified:

Database Issue - Default Driver

Receiving the following error message:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/apptest/AspTest.asp, line 12

The data source is valid.  Can successfully login and access via Oracle SQL Plus.  What other line should be included?


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Test</title>
</head>
<body>
<%
set db=Server.CreateObject("ADODB.connection")
db.Open sql,"Provider=OraOLEDB.Oracle;User ID=cbierce;Password=cbierce;Data Source=Test1;"
response.write("Connection State:" & db.state)
%>
</body>
</html>

0
cbierce
Asked:
cbierce
  • 5
  • 4
  • 4
1 Solution
 
aspmaestroCommented:
<%
set db=Server.CreateObject("ADODB.connection")
db.Open sql,"Provider=OraOLEDB.Oracle;User ID=cbierce;Password=cbierce;Data Source=Test1;"
response.write("Connection State:" & db.state)
%>

remove "sql"
from
db.open sql,"...."

0
 
cbierceAuthor Commented:
I am still receiving the same error message after doing that.
0
 
Thandava VallepalliCommented:
You need to create "Test1" data source name (DSN) in Data Sources (ODBC) under Administrative Tools in your system.

itsvtk
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
aspmaestroCommented:
Are u using Oracle 8 or Oracle 8i?


Using the OLEDB Provider of oracle8:
oConn.Open "Provider=OraOLEDB;" & _
                 "Server=OracleServer;" & _
                 "User ID=demo;" & _
                 "Password=demo;"

Using the OLEDB Provider of oracle8i:
oConn.Open "Provider=OraOLEDB.Oracle;" & _
                 "Server=OracleServer;" & _
                 "User ID=demo;" & _
                 "Password=demo;"
0
 
Thandava VallepalliCommented:
after  creating the Test1 DSN by using  microsoft help.....

use this sysntax....

'======================================================
'DSN CONNECTION
objConn.open ("DSN=Test1;uid=cbierce;pwd=cbierce;")
'======================================================


Now your code is below...
============================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Test</title>
</head>
<body>
<%
set db=Server.CreateObject("ADODB.connection")
db.open ("DSN=Test1;uid=cbierce;pwd=cbierce;")
response.write("Connection State:" & db.state)
%>
</body>
</html>

itsvtk
0
 
Thandava VallepalliCommented:
If u want DSN less connection... here is the syntax....

'=====================
'DSNLESS CONNECTION
objConn.Open "Driver={Microsoft ODBC for Oracle};Server=MySysName;Uid=MyUid;Pwd=MyPwd;"
'=====================

using the above syntax u need not create any DSNs.......

itsvtk
0
 
cbierceAuthor Commented:
I am still receiving the error.  I have tried your different recommendations, but am still having the same error.  I do have it defined in the Data Sources (ODBC).

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Test</title>
</head>
<body>
<%
set db=Server.CreateObject("ADODB.connection")
db.Open,"Driver=c:\oracle\ora81bin\sqora32.dll;Server=testserver;Uid=cbierce;Pwd=cbierce;Data Source=Test1;"
response.write("Connection State:" & db.state)
%>
</body>
</html>
0
 
aspmaestroCommented:
if you have defined a DSN  then give the connection string as written by itsvtk
0
 
cbierceAuthor Commented:
I tried it that way first, but when I received the error message again, I tried it the next way.
0
 
aspmaestroCommented:
db.Open "Provider=OraOLEDB;" & _
                 "Server=testserver;" & _
                 "User ID=cbierce;" & _
                 "Password=cbierce;"

This sets up the connection using oledb....
Your oracle server is testserver. Using this conn. string do u get the same error msg?


0
 
cbierceAuthor Commented:
That worked after I changed it to OraOLEDB.Oracle.
0
 
aspmaestroCommented:
oh ! glad to help u out. bye
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 5
  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now