|
 |
access_asp thread: Error on Update page
Message #1 by "Desi McKeown" <desi@m...> on Tue, 5 Nov 2002 21:33:10
|
|
Hi,
I am using FrontPage 2002 to view and update an access database. I can
view information fine, but when I try to update I receive the following
error message.
Can anyone please help?
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/UpdateRoom.asp, line 29
fp_sDefault="Period=CHANGE&DateBooked=09/01/1974&C1="Available"&C2="Availa
ble"&C3="Available"&C4="Available"&C5="Available"&ID=1"
-----------------------------------------------------^
thanks,
Desi
Message #2 by "Ken Schaefer" <ken@a...> on Wed, 6 Nov 2002 11:21:51 +1100
|
|
Isn't the problem obvious?
Your string is being terminated when it reaches the first double quotation
mark ("avai...), and VBScript engine doesn't know what to do with the rest
because it's not valid syntax.
I suggest you either:
a) remove the single quote marks
b) if they are being passed via querystring you use Server.URLEncode() to
encode them properly
c) escape them by using two double quote marks:
strMyString = "here is my string with "" double quote marks in the middle"
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Desi McKeown" <desi@m...>
Subject: [access_asp] Error on Update page
: I am using FrontPage 2002 to view and update an access database. I can
: view information fine, but when I try to update I receive the following
: error message.
:
: Can anyone please help?
:
: Microsoft VBScript compilation error '800a0401'
:
: Expected end of statement
:
: /UpdateRoom.asp, line 29
:
: fp_sDefault="Period=CHANGE&DateBooked=09/01/1974&C1="Available"&C2="Availa
: ble"&C3="Available"&C4="Available"&C5="Available"&ID=1"
: -----------------------------------------------------^
:
: thanks,
:
: Desi
Message #3 by "Desi McKeown" <desi@m...> on Wed, 6 Nov 2002 23:37:59
|
|
Yes - it was obvious. After you pointed it out. I must be going mad.
Thanks for assisting me.
Desi
|
|
 |