Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP to MS Access Database connection

Status
Not open for further replies.

Malcolm7

Technical User
Jun 27, 2001
2
US
I am running Ultra Dev and am having some trouble connecting an MS Database file to an ASP page. The server runs on Windows 2000 Server Edition. I have set up an ODBC on the server as well as my computer. When I run the website I am able to fill out the form on the ASP page but when i hit submit it gives me the error message

Microsoft OLE DB Provider for ODBC Drivers Error 8000040005
[Microsoft][ODBC Driver Manager] Data Source name not found and no default driver specified.
/Workptest2.asp, line 88


Workptest2.asp is a test page that i created with a very simple database but i still got this error message. I know this must seem like a simple question but any help will be greatly appreciated. :cool: Thanks.

-Malcolm
 
That error message means that either your DSN has not properly been set up, or you are calling it wrong --

What does your connection string look like??

penny.gif
penny.gif
 
Thank you for responding. Here is my connection string, lines 85-96 are there.

If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

If (MM_editRedirectUrl <> &quot;&quot;) Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
 
You connection string is not listed -- it's going to look something like:

dim con
set con = server.createObject(&quot;ADODB.Connection&quot;)
con.open (&quot;DSN=whatever.......&quot;)

and so on -- that's where your problem is stemming from --

your DSN should match up with the name that you have set on the server in the ODBC section --

lemme know -
paul
penny.gif
penny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top