[thelist] Connection string issue
Flavia Tarzwell (FayeC)
ftarzwell at fayec.com
Fri Jan 12 19:55:02 CST 2007
Hi,
A while ago I created a members area for a site where the company would
upload the manuals, notes, etc for their products and only registered
users could access the pages to download the notes.
I am not an expert programmer but that was easy enough.
The site was running for years and from time to time they would move to
another server and I needed to change the path to the database.
They finally got to one server that allowed relative paths to be used
and so for the last 2 years the site had been using the following
connection string:
Set Con = Server.CreateObject("ADODB.Connection")
ConnectString= "Provider=Microsoft.Jet.OLEDB.4.0;" &_
"Data Source=" & Server.MapPath("..\db\database1.mdb")
Con.Open ConnectString
Then last month they moved the site to a new box and now the site gets
an error:
Error Type:
Server object, ASP 0175 (0x80004005)
The '..' characters are not allowed in the Path parameter for the
MapPath method.
I did use the full new path to the database
(/home/voicerec/public_html/aspnet_client - the full path to the db
would actually be www.site.com/db/database1.mdb while the pages using
the db are at the same level www.site.com/asp/page.asp) that was given
to me but when I do so I get another error:
Error Type:
ADODB.Connection.1 (0x80004005)
SQLState: IM002 Native Error Code: 0 [DataDirect][ODBC lib] Data source
name not found and no default driver specified
I am at my wits end here. I have tried 3 other connection strings and
still no luck.
I would really appreciate some help figuring this out.
If anybody has any advice or point me to some tutorial on ADO
connections I might find the answer.
Thank you in advance for any help,
FayeC
More information about the thelist
mailing list