Home > front end >  'and' near a syntax error, how to change?
'and' near a syntax error, how to change?

Time:12-06

EqType=myLib. GetType ()

EqUnique=myLib. GetUnique ()

EqName="unknown items"

SQL="select * from Sp_MuItem where Uniq=" & amp; EqUnique & amp; "And Type=" & amp; EqType

Set the rs=lib. Execute (SQL, true)

CodePudding user response:

Response. Write the SQL SQL statements output, copied to perform knew database environment, is usually variable has no value or data type is not right

CodePudding user response:

The simplest method is variable '
'
SQL="select * from Sp_MuItem where Uniq='" & amp; EqUnique & amp; "' and Type=" & amp; EqType&" '"

CodePudding user response:

Ls should be correct

CodePudding user response:

Could be a query variable values less single quotes,,,

CodePudding user response:

It is recommended to use

Alert (" SQL "+ SQL);

Look at the code is correct
  •  Tags:  
  • ASP
  • Related