Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

dsn-less connections on hosting

New Here ,
Apr 19, 2007 Apr 19, 2007

Copy link to clipboard

Copied

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")
TOPICS
Server side applications

Views

297
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 20, 2007 Apr 20, 2007

Copy link to clipboard

Copied

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


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 20, 2007 Apr 20, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 20, 2007 Apr 20, 2007

Copy link to clipboard

Copied

> 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.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 21, 2007 Apr 21, 2007

Copy link to clipboard

Copied

LATEST
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/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines