Cesar
|
Posted: 04/20/2001, 2:43 PM |
|
I have writen these lines to update a table field (member_id) when sessionid
is session(unicoid).
I think I have got a sintaxis error...but Actully I can't find it out.
Dim sactual
Dim sdonde
sactual = "update orders set"& _
"[member_id]= " & Session("UserID")_
sdonde = "[sessionid]= " & Session("unicoid")_
sSQL = sactual & " where " & sdonde
cn.execute sSQL
it prompts this messenge:
Microsoft VBScript compilation error '800a0401'
Expected end of statement
sdonde = &"[sessionid]= " & Session("unicoid")_
^
thanks,
cesar
|
|
|
Joachim Uersfeld
|
Posted: 04/21/2001, 12:39 AM |
|
Dim sactual
Dim sdonde
sactual = "update orders set [member_id] = " & Session("UserID")
sdonde = "[sessionid] = " & Session("unicoid")
sSQL = sactual & " where " & sdonde
cn.execute sSQL
Joachim
"Cesar" <cesar@ciudadmall.com> schrieb im Newsbeitrag
news:9bqahs$3i6$1@mail.tankhill.com...
> I have writen these lines to update a table field (member_id) when
sessionid
> is session(unicoid).
> I think I have got a sintaxis error...but Actully I can't find it out.
>
> Dim sactual
> Dim sdonde
> sactual = "update orders set"& _
> "[member_id]= " & Session("UserID")_
> sdonde = "[sessionid]= " & Session("unicoid")_
> sSQL = sactual & " where " & sdonde
>
> cn.execute sSQL
>
> it prompts this messenge:
> Microsoft VBScript compilation error '800a0401'
>
> Expected end of statement
>
> sdonde = &"[sessionid]= " & Session("unicoid")_
> ^
>
> thanks,
> cesar
>
>
>
|
|
|
Joachim Uersfeld
|
Posted: 04/21/2001, 3:02 PM |
|
If SessionID is not numeric then it should be:
Dim sactual
Dim sdonde
sactual = "update orders set [member_id] = " & Session("UserID")
sdonde = "[sessionid] = '" & Session("unicoid") & "'"
sSQL = sactual & " where " & sdonde
cn.execute sSQL
Joachim
"Joachim Uersfeld" <uersfeld@pc-team.de> schrieb im Newsbeitrag
news:9brdel$c7l$1@mail.tankhill.com...
> Dim sactual
> Dim sdonde
> sactual = "update orders set [member_id] = " & Session("UserID")
> sdonde = "[sessionid] = " & Session("unicoid")
> sSQL = sactual & " where " & sdonde
> cn.execute sSQL
>
> Joachim
>
>
> "Cesar" <cesar@ciudadmall.com> schrieb im Newsbeitrag
>news:9bqahs$3i6$1@mail.tankhill.com...
> > I have writen these lines to update a table field (member_id) when
> sessionid
> > is session(unicoid).
> > I think I have got a sintaxis error...but Actully I can't find it out.
> >
> > Dim sactual
> > Dim sdonde
> > sactual = "update orders set"& _
> > "[member_id]= " & Session("UserID")_
> > sdonde = "[sessionid]= " & Session("unicoid")_
> > sSQL = sactual & " where " & sdonde
> >
> > cn.execute sSQL
> >
> > it prompts this messenge:
> > Microsoft VBScript compilation error '800a0401'
> >
> > Expected end of statement
> >
> > sdonde = &"[sessionid]= " & Session("unicoid")_
> > ^
> >
> > thanks,
> > cesar
> >
> >
> >
>
>
|
|
|
|