Solved

Database Issue - Default Driver

Posted on 2004-10-07
13
396 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 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