asp database problems

watts3000

Senior member
Aug 8, 2001
619
0
0
I'm creating a asp website and I keep getting this error does anyone know how to fix it.




Microsoft OLE DB Provider for ODBC Drivers error '80004005'

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

/default.asp, line 12
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
When you open a database in ASP you must supply a DSN (data source name) -- this is either a local file ("file DSN") or essentially a shortcut to a database that's been set up by your hosting admins. Go to msdn.microsoft.com for articles, and/or a website like asp101.com
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
If you have an error, it helps to actually post code :)

Basically, you're probably failing on one of two methods, both are the Open() method of the ADO Connection object, or the ADO Recordset object. As DaveSimmons said, make sure you're using a valid DSN or connection string. e.g.

If you're using Access, you could use:

driver={Microsoft Access Driver (*.mdb)};dbq=c:\fullpathtoyouraccessdatabase

For SQL Server, you could use:

driver={SQL Server};server=yourserver;database=yourdatabase;uid=username;pwd=password

HTH