Forums
This topic is locked
DSN-Less
Posted 02 Aug 2002 11:35:14
1
has voted
02 Aug 2002 11:35:14 Barry Williams posted:
hello.Ive made a DSN-Less Connection to my database but if got an error. ive tired many differnt dsnless connections but none of them work
this is the latest oneif tried
Dim MM_shadfray_STRING
PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=d:\siteIP\sitename\DB\database.mdb;PASSWORD=password;
*NOTE* names have been removed and replaced
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/sitename/Connections/database.asp, line 9
PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=d:\siteIP\sitename\DB\database.mdb;PASSWORD=password;
----------------------------^
any help?
Replies
Replied 02 Aug 2002 13:18:58
02 Aug 2002 13:18:58 Viktor Farcic replied:
Connection string is OK. There must be something else that creates problems.
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
hello.
Ive made a DSN-Less Connection to my database but if got an error. ive tired many differnt dsnless connections but none of them work
this is the latest oneif tried
Dim MM_shadfray_STRING
PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=d:\siteIP\sitename\DB\database.mdb;PASSWORD=password;
*NOTE* names have been removed and replaced
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/sitename/Connections/database.asp, line 9
PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=d:\siteIP\sitename\DB\database.mdb;PASSWORD=password;
----------------------------^
any help?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Viktor Farcic
www.farcic.com
TalkZone Manager
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
hello.
Ive made a DSN-Less Connection to my database but if got an error. ive tired many differnt dsnless connections but none of them work
this is the latest oneif tried
Dim MM_shadfray_STRING
PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=d:\siteIP\sitename\DB\database.mdb;PASSWORD=password;
*NOTE* names have been removed and replaced
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/sitename/Connections/database.asp, line 9
PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=d:\siteIP\sitename\DB\database.mdb;PASSWORD=password;
----------------------------^
any help?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Viktor Farcic
www.farcic.com
TalkZone Manager
Replied 02 Aug 2002 15:33:15
02 Aug 2002 15:33:15 Barry Williams replied:
any ideas what else could be causing the error?
Replied 05 Aug 2002 13:19:59
05 Aug 2002 13:19:59 richard thomas replied:
I used to have loads of trouble getting connections right, then found the following method:
"Driver={Microsoft Access Driver (*.mdb)};DBQ=" + Server.MapPath("/folder/database.mdb;Uid=username;Pwd=password;"
The MapPath method ensures you don't mess up the connection string to your ftp root, then just map the last folder (that your database is in) and the database name, if you have no database user and pass just delete tem from the string. Good luck.
"Driver={Microsoft Access Driver (*.mdb)};DBQ=" + Server.MapPath("/folder/database.mdb;Uid=username;Pwd=password;"

The MapPath method ensures you don't mess up the connection string to your ftp root, then just map the last folder (that your database is in) and the database name, if you have no database user and pass just delete tem from the string. Good luck.