Skip to main content
Participant
April 19, 2007
Question

dsn-less connections on hosting

  • April 19, 2007
  • 4 replies
  • 320 views
Hi,

In the past Ive had lost of success using Dreamweaver 8 to create dsn-less conections on a remote testing server. It has always been a Windows server.

Recently i have been looking at creating a simple blog page for a friend using an Access database on his web hosting on a Linux server using ASP VBScript.

It is virtual hosting so all the pages have to be FTPd to a directory called "web" Im sure I have setup my site definitions correctly locally and on the testing server. However after editing my custom connection string and clicking the test key I cannot establish a connection.

The connection string I am using is similar to the following

"Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath("\DBPath\db.mdb")

I commonly get error message 500 "Unknown server Error" after pressing the test button.

Im pretty sure the connection string is correct and its something to do with the fact its on virtual hosting (but i did think using Server.Mappath would handle that) or its because its a Linux server.

Any points in the right direction would be most appreciated! "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath("\DBPath\db.mdb")
This topic has been closed for replies.

4 replies

Inspiring
April 21, 2007
Ted Dawson wrote:
> ASP/VBSCRIPT/ACCESS on a Linux box? I don't think so.

Yes, it is possible. I used it many years ago with ChiliSoft ASP. It's
now called Sun Java System Active Server Pages:

http://www.sun.com/software/chilisoft/

Some hosting companies do offer Chilisoft packages.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Inspiring
April 21, 2007
> Recently i have been looking at creating a simple blog page for a friend
> using
> an Access database on his web hosting on a Linux server using ASP
> VBScript.


ASP/VBSCRIPT/ACCESS on a Linux box? I don't think so.

Inspiring
April 20, 2007
On 20 Apr 2007 in macromedia.dreamweaver.appdev, Piers wrote:

> I wouldn't use Server.MapPath for a DB conn. The server will have to
> calculate the path for the db every time a connection is made. I
> (people please correct me on this) feel it would be better to spend
> a bit of time and find the path to the DB at the start, and hard
> code it.

That's the way I do it.

> They're not gonna move your db without telling you!

Wanna bet?

More specifically - the hosting provider won't change /your/ file
structure. But they may change theirs, which could result in a file path
like D:\clients\username1234\database\mydb.mdb changing to r:\newserver
\newpath\newusername\databases\mydb.mdb Hopefully they would notify you
in advance, though.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/contact.php
Inspiring
April 20, 2007
I wouldn't use Server.MapPath for a DB conn. The server will have to
calculate the path for the db every time a connection is made. I (people
please correct me on this) feel it would be better to spend a bit of time
and find the path to the DB at the start, and hard code it. They're not
gonna move your db without telling you!

Had the same prob when I first came across DSN-less conns. Put a simple page
with
<%=Server.MapPath("ME")%>
as content and see where your page lies. (ME is just any old text). Then
adapt the path to point at your db.

My typical path result would be something like
D:\clients\username1234\database\mydb.mdb

--
HTH,

Piers