Forums
This topic is locked
Creating DSN Connection in Dreamweaver
Posted 27 Nov 2006 15:21:17
1
has voted
27 Nov 2006 15:21:17 kirsty burgoine posted:
Hi,I've created a site in Dreamweaver MX with .asp pages and using an Access database. Everything works perfectly when I test it locally but not when I upload it to the live server.
I created a DSN in the control panel for the webspace host called Swift.DSN. This is in the folder Data with swift.mdb as they said it needed to be.
Than they said that all I needed to do was paste the code they generated into my .asp page
This is the code:
Set oConn = Createobject("AdoDB.Connection"
oConn.Open "FILEDSN=" & server.mappath("/Data/{Your dsn name}.dsn"
So I added
Set oConn = Createobject("AdoDB.Connection"
oConn.Open "FILEDSN=" & server.mappath("/Data/Swift.DSN.dsn"
But I get this error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
General error: Invalid file dsn ''
/NewSite/Careers.asp, line 6
What am I doing wrong.
Kirsty
Replies
Replied 29 Nov 2006 17:10:13
29 Nov 2006 17:10:13 Dave Clarke replied:
just a guess but maybe it's the dsn name.. Swift.DSN.DSN try changing the dsn name to swift_dsn or swiftdsn or anything without the .(dot)
DW8.02|ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome.
www.reunite.co.uk
DW8.02|ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome.
www.reunite.co.uk