Solved

Database Issue - Default Driver

Posted on 2004-10-07
13
393 Views
Last Modified: 2012-06-27
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
Comment
Question by:cbierce
  • 5
  • 4
  • 4
13 Comments
 
LVL 5

Expert Comment

by:aspmaestro
ID: 12247827
<%
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
 

Author Comment

by:cbierce
ID: 12247857
I am still receiving the same error message after doing that.
0
 
LVL 14

Expert Comment

by:Thandava Vallepalli
ID: 12247998
You need to create "Test1" data source name (DSN) in Data Sources (ODBC) under Administrative Tools in your system.

itsvtk
0
ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

 
LVL 5

Accepted Solution

by:
aspmaestro earned 500 total points
ID: 12248001
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
 
LVL 14

Expert Comment

by:Thandava Vallepalli
ID: 12248006
0
 
LVL 14

Expert Comment

by:Thandava Vallepalli
ID: 12248039
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
 
LVL 14

Expert Comment

by:Thandava Vallepalli
ID: 12248059
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
 

Author Comment

by:cbierce
ID: 12248426
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
 
LVL 5

Expert Comment

by:aspmaestro
ID: 12248509
if you have defined a DSN  then give the connection string as written by itsvtk
0
 

Author Comment

by:cbierce
ID: 12248576
I tried it that way first, but when I received the error message again, I tried it the next way.
0
 
LVL 5

Expert Comment

by:aspmaestro
ID: 12248635
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
 

Author Comment

by:cbierce
ID: 12248815
That worked after I changed it to OraOLEDB.Oracle.
0
 
LVL 5

Expert Comment

by:aspmaestro
ID: 12248826
oh ! glad to help u out. bye
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Prevent URL from printing on header 5 71
JSON error 4 66
Import csv files to MS SQL 5 82
age from date of birth 4 43
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question