Click here to Skip to main content
15,887,356 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am developing an asp application, in that I am using global.asa for connecting to database here is the code for connection string.
Application("Conn_TestGovbergConnectionString") = "Provider=SQLOLEDB.1;Data Source=VCNSQL88.webhost4life.com,1433;User Id=test;PASSWORD=test;Initial Catalog=test;"

and I am calling it in index.asp like this.
VB
Dim objConn
Set objConn=Server.CreateObject("ADODB.Connection")
objConn.Mode = 3
objConn.cursorlocation = 3
objConn.Open (Application("Conn_TestGovbergConnectionString"))

It is giving error like this.
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/staging1/index.asp, line 9

Can anyone help me to solve this?
Posted
Updated 4-Sep-11 20:07pm
v2
Comments
Prerak Patel 5-Sep-11 2:10am    
Use code block for code sections in question.

1 solution

Looks like you're using ODBC but you haven't defined a ODBC data source in control panel. Open Control Panel, choose "Set up data sources (ODBC)" and define a new DSN. After that use that DSN name as your data source in the connection string.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900