?
Solved

Database Issue - Default Driver

Posted on 2004-10-07
13
Medium Priority
?
404 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: 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!

 
LVL 5

Accepted Solution

by:
aspmaestro earned 2000 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: 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

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.

Question has a verified solution.

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

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…
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/…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

770 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