Solved

ODBC Drivers error '80004005'

Posted on 2003-12-01
17
102,493 Views
Last Modified: 2011-08-18
This is the following error that i get.

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

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

error in asp file line 82:

Here is what i do to establish connection. I use a system DSN, DSN was also supposedly created on the server-side as well.

Set xConn = Server.CreateObject("ADODB.Connection")
xConn.ConnectionString = "DSN=CMP2 Test"
xConn.Open strConn

What is the problem? I want to be able to establish a connection with this database on SQL Server.
0
Comment
Question by:mathew_s
  • 7
  • 2
  • 2
  • +6
17 Comments
 
LVL 15

Expert Comment

by:Raisor
ID: 9853866
Hi,

Where is the "strConn" variable declared?

Best regards, Raisor
0
 
LVL 1

Author Comment

by:mathew_s
ID: 9854295
Good question. Think it was one of my previous attempts to get the stupid thing to work. Forgot to take it out.  Thanks, however, after taking strConn out. I now have:

Set xConn = Server.CreateObject("ADODB.Connection")
xConn.ConnectionString = "DSN=CMP2 Test"
xConn.Open

I still get errors:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'

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

error line 81

I also tried without putting "DSN=", just CMP2 Test...so I now had
Set xConn = Server.CreateObject("ADODB.Connection")
xConn.ConnectionString = "CMP2 Test"
xConn.Open   <--- line 81

Still  get the same error.
Also I tried the following:

set xConn = Server.CreateObject("ADODB.Connection")
DSNLog = "PROVIDER=MSDASQL;DRIVER={SQL Server}; "
DSNLog = DSNLog & "Server=STR02;"
DSNLog = DSNLog & "Database=CMP2;"
DSNLog = DSNLog & "Trusted_Connection=yes;"
xConn.Open DSNLog ' Open Recordset and get the field info  <--line 85

Get a different error now.

Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '\'.

error line 85

Database is called CMP2, system DSN is called CMP2 Test.
Hope this info. helps...Any suggestions?
0
 
LVL 15

Accepted Solution

by:
Raisor earned 125 total points
ID: 9856070
Hi,

The last error you got tells that there's no user defined for the trusted connection! (MACHINENAME\USERNAME) for DOT.NET this is "MACHINENAME\ASPNET" -> this user should have dbo rights.

By the way -> if you have a SQL Server behind it (you are using the drivers!) why don't you connect directly to the database?

Make sure you have no typo in your DSN ... make sure your DSN "IS SYSTEM DSN"! Open the ODBC Manager to check this ... use the "TEST" option and run a connection test ... if all that is done and the test turned out to be successfull -> then you can be sure that your DSN works fine ... You should then replace "trusted connection" with an existing user name and password ...

Best regards, Raisor
0
 

Expert Comment

by:sachinmergu
ID: 9990678
Dear sir,
while inputing data i am getting error are as follows:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Could not allocate space for object 'service' in database 'sims' because the 'PRIMARY' filegroup is full.

with regards
sachin
0
 

Expert Comment

by:abagla
ID: 10871651
I am getting the followin g error

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC SQL Server Driver][SQL Server]Could not allocate space for object 'TblDtlInsured' in database 'heritage' because the 'PRIMARY' filegroup is full.
0
 
LVL 5

Expert Comment

by:MichaelSFuller
ID: 12175867
How big is tempdb?
 
0
 
LVL 5

Expert Comment

by:MichaelSFuller
ID: 12175903
Is the web server and sql server the same box, same domain? If not how is this going to work? "MACHINENAME\ASPNET"
0
 

Expert Comment

by:ChrisDenny
ID: 12233104
Problem is the ODBC configuration....

Go to that and verify that you have setup correctly...

In ODBC, the setting should exist under the "System DSN" tab and no other than that one.

Make sure domino server is correct and "Database" is correct.  Click on "Options" to make sure that browsed to the Notes.id file that you want to use (you will see the name of the employee that the file belongs to once selected) and enter the password for the notes account.

Let me know what is next...
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

Expert Comment

by:ChrisDenny
ID: 12233110
By the way, this is what mine looks like if you are curious:

Dim oConn
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.ConnectionString = "DSN=Deskop"
oConn.Open
0
 

Expert Comment

by:ChrisDenny
ID: 12233116
And the ODBC configuration is on the web server
0
 

Expert Comment

by:mearisk
ID: 12927613
I am trying this in excel. What reference should I be using.

Mark
0
 

Expert Comment

by:ChrisDenny
ID: 12929238
In the ODBC configuration, use the System configuration. Then in Excel, you can import the information.
0
 

Expert Comment

by:ChrisDenny
ID: 12929343
To import into Excel, you would go to the "Data" tab and select "Import External Data - Import Data".  Then, select "+Connect to New Data Source.odb", Next screen select "ODBC DSN" and then select the connection that you already made.
0
 

Expert Comment

by:ChrisDenny
ID: 12929360
If the above doesn't help, please help me understand the current problem in detail and I will do my best to give better directions back to you.
0
 

Expert Comment

by:ChrisDenny
ID: 12936823
Mearisk:
Please do me a favor and open a new ticket and reference that new ticket in here.  That way, I can get my points and help you out with this.  I hope you understand.  Just trying to follow the rules/politics of Experts Exchange site.

Thanks,

Chris Denny
0
 

Expert Comment

by:CWilliamWallace
ID: 13025335
Have you upgraded the system to MDAC 2.8?

Bill.
0
 

Expert Comment

by:quocnhan
ID: 13044131
May be hack this erros
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how the fundamental information of how to create a table.

911 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

20 Experts available now in Live!

Get 1:1 Help Now