Solved

Database Issue - Default Driver

Posted on 2004-10-07
13
388 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
 
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now