Groups | Blog | Home
all groups > inetserver asp db > april 2006 >

inetserver asp db : ASP error


jagdishl NO[at]SPAM gmail.com
4/24/2006 9:50:13 PM
Hi
I got this VB script compilation error as shown below.I checked up a
web-site which

Microsoft VBScript compilation (0x800A0400)
Expected end of statement
/Informs/membership_form.asp, line 34, column 66

The line which has the error is also shown below.Please do


adocon.Open "Driver = {Microsoft Access Driver(*.mdb)}; DBQ=" &
C:\Documents and Settings\Jugluck\Desktop\('informs.mdb')

I would really appreciate if you could let me know the exact error in
this code.
Thanks

Jagdish.l
Mike Brind
4/25/2006 12:22:07 AM

[quoted text, click to view]

2 errors:

Error 1. You've terminated the connection string after DBQ=, and then
concatentated another string without putting it in quotes (your path).

Error 2. You've placed the name of the datafile in brackets, and put
single quotes around it. This is not a valid path syntax (unless you
really have those characters as part of the database file name).

I suggest you use the native OLEDB provider for Access. From a
performance point of view, it's considerably better than the ODBC
driver you are using. Then your connection string will look like this:

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents
and Settings\Jugluck\Desktop\informs.mdb;"
Set adocon = Server.CreateObject("ADODB.Connection")
adocon.open strConn

You will obviously need to ensure that the IUSR_Machinename has modify
permissions for your desktop in order to access the database.

--
Mike Brind
AddThis Social Bookmark Button