Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBscript error in update script.

Status
Not open for further replies.

sthmpsn1

MIS
Sep 26, 2001
456
US
I am getting the following error. Can someone tell me why I would be getting this error?

Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/am1st/MyStuff/updatetest/maintain1.asp, line 50, column 6
dim x = 1
-----^

Here is the code

%
if request("Selected2") = "1" Then
dbrs2.movefirst
dim x = 1 // This is line 50
do while NOT dbrs2.EOF

''dbrs2("date")=request("date" & x)
dbrs2("hour")=request("hour" & x)
''dbrs2("code")=request("code" & x)
dbrs2.update
dbrs2.movenext
loop
%>

 
Are you sure you can declare and instantiate your variable on one line? Try splitting it into two statements and see if that helps:

Dim x
x=1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top