Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: expected identifier


Message #1 by "Tim Lyons" <lyno@h...> on Wed, 17 Jul 2002 18:59:51
can't seem to get ride of the error:
microsoft VBScript compilation (0x800A03F2)
'expected identifier'

line 15 points to the code:

DIM theConn, rs, source, old, new, verify, email, sql, check, compare

any ideas? thx

TL
Message #2 by "Larry Woods" <larry@l...> on Wed, 17 Jul 2002 11:10:10 -0700
Tim,

"new" is a reserved word.  I would not use "compare" either.

Larry Woods - MCSD, MCT


> -----Original Message-----
> From: Tim Lyons [mailto:lyno@h...]
> Sent: Wednesday, July 17, 2002 7:00 PM
> To: Access ASP
> Subject: [access_asp] expected identifier
>
>
> can't seem to get ride of the error:
> microsoft VBScript compilation (0x800A03F2)
> 'expected identifier'
>
> line 15 points to the code:
>
> DIM theConn, rs, source, old, new, verify, email, sql,
> check, compare
>
> any ideas? thx
>
> TL
>

Message #3 by "Ken Schaefer" <ken@a...> on Thu, 18 Jul 2002 11:25:44 +1000
This is a multi-part message in MIME format.

------=_NextPart_000_00E2_01C22E4D.DAF4A1E0
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

Reserved words again :-)

Just like "Date" in your database is going to cause problems (what was 
wrong with "OrderDate" or something a little more descriptive), you 
really shouldn't use language keywords as variables (unless you want to 
be like this: http://mindprod.com/unmain.html )

Dim objConn        ' ADODB.Connection
Dim objRS          ' ADODB.Recordset
Dim strSQL         ' as String (SQL string)
Dim strOldUserName ' as String (old User Name)
Dim strNewUserName ' as String (new User Name)
Dim blnVerify      ' as Boolean (is user verified)
Dim strEmail       ' as String (new User Email addy)
Dim blnCheck       ' as Boolean (...)

you get the idea?

Try:
a) prefixing your variables with a type descriptor. this way, when we 
read your code, we have some idea what all these things are. Secondly, 
you'll neved make the mistake of doing:

    intMyVar =3D CInt(objCheck)

b) putting in something descriptive to describe what your variables 
actuall are for. dteTheDate is useless. dteOrderDate, 
dteBookingStartTime, dteBookingEndTime etc are far more useful.

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Tim Lyons" <lyno@h...>
Subject: [access_asp] expected identifier


: can't seem to get ride of the error:
: microsoft VBScript compilation (0x800A03F2)
: 'expected identifier'
:
: line 15 points to the code:
:
: DIM theConn, rs, source, old, new, verify, email, sql, check, compare
:
: any ideas? thx
:
: TL



  Return to Index