Forums
This topic is locked
Microsoft OLE DB Provider for ODBC Drivers error '
Posted 25 Nov 2006 13:05:15
1
has voted
25 Nov 2006 13:05:15 kirsty burgoine posted:
Hi I've built a site for a company that needed some updateable areas. To do this I've used an access database and .asp pages.Everything works perfectly on my local testing server and in order to get it working online I went to the control panel of my webhost which generated this code for me to paste into my .asp pages:
Set oConn = Createobject("AdoDB.Connection"
oConn.Open "FILEDSN=" & server.mappath("/Data/{Your dsn name}.dsn"
my dsn name is Swift.dsn so I pasted this in so my .asp looks like this:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/Swift.asp" -->
<%
Set oConn = Createobject("AdoDB.Connection"
oConn.Open "FILEDSN=" & server.mappath("/Data/{Swift.dsn}.dsn"
Dim rsCareers
Dim rsCareers_numRows
Set rsCareers = Server.CreateObject("ADODB.Recordset"
rsCareers.ActiveConnection = MM_Swift_STRING
rsCareers.Source = "SELECT * FROM Careers ORDER BY ID ASC"
rsCareers.CursorType = 0
rsCareers.CursorLocation = 2
rsCareers.LockType = 1
rsCareers.Open()
rsCareers_numRows = 0
%>
Which when I tested the page I got this error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
General error: Invalid file dsn ''
/NewSite/Careers.asp, line 6
I contacted my host support who said:
I think this line within Careers.asp needs amending:
oConn.Open "FILEDSN=" & server.mappath("Data/{Swift.dsn}.dsn"
The curly brackets should be omitted, sorry the sample code is a bit misleading.
Now I am at home using a mac so can't test the pages locally, the support is closed for the weekend and when I uploaded th edited page I get the same error.
How do I fix this?
Thanks
Kirsty
Kirsty