Forums

ASP

This topic is locked

Connection script problem

Posted 01 Feb 2005 15:37:39
1
has voted
01 Feb 2005 15:37:39 Mark Saville posted:
I'd be grateful for any help - I'm trying to connect to a Access 2000 database on a remote website server, and the ISP doesn't support ODBC, so they recommend a DSN-less connection. So I've tried both of the following:

Driver={Microsoft Access Driver (*.mdb)}; DBQ=D:\j\o\joebloggs\private\database.mdb
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\j\o\joebloggs\private\database.mdb

Adding either of these scripts as a custom connection string in DMX2004 (on Mac OSX) gives an "HTTP Error 44 Bad Request" on testing. The testing server is set up with exactly the same settings as the remote server, and I'm at a complete loss as to why it won't work. I've tried Server.MapPath variants as well - all give the same error. My ISP suggest using:

Set Conn = Server.CreateObject("ADODB.Connection"
conString = "DBQ=D:\j\o\joebloggs\private\database.mdb"
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};" & conString

which, ironically, connects fine if I want to manually code the pages - but I want to use Dreamweaver. Any suggestions?

Replies

Replied 04 Feb 2005 14:40:55
04 Feb 2005 14:40:55 Lee Diggins replied:
Hi Mark

I've seen this before when working with remote data. I used two connections, one setup to work with a local copy of the DB and the other that works when online. Just make sure when you upload the file you have changed to the connection string to the one that works online.

Hope this makes sense.

Lee Diggins - DMXzone Manager

Sharing Knowledge Saves Valuable Time!!!
Replied 04 Feb 2005 17:20:00
04 Feb 2005 17:20:00 Simon Martin replied:
Cloaking might also help
I typically use 2 connections like Lee, so I've cloaked my Connections folder - the number of times I've overwritten the connection string because I accidentally uploaded the Connection along with the pages!

Live the life you love
Love the life you live

Simon
DMXZone Zone Manager
Replied 07 Feb 2005 17:19:59
07 Feb 2005 17:19:59 Mark Saville replied:
Thanks for the pointers! I'll try the joint connection script approach.
Replied 08 Feb 2005 16:38:58
08 Feb 2005 16:38:58 Mark Saville replied:
Problem solved, thanks to your tip offs. DreamWeaver automatically completes the "URL Prefix" in the Testing Server window with the ftp address, whereas what I actually needed in there was the URL of the site.

Reply to this topic