SQL syntax in ASP

Results 1 to 3 of 3

Thread: SQL syntax in ASP

  1. #1
    Join Date
    Dec 1969

    Default SQL syntax in ASP

    Can someone tell me what is the proper syntax for this statement<BR> If objRStest.Fields("CommonName") &#060;&#062; session ("LOGON_USER") and lastname = "" Then<BR> response.write "It&#039s right"<BR>My question is what is the proper syntax for "and" in the statement above. For somehow it doesn&#039t like the "and" in my if statement. Thank you

  2. #2
    krishna Guest

    Default RE: SQL syntax in ASP

    for better result try this one<BR>If strcomp(objRes("filedname"),session("logon_user"), 1)&#060;&#062;0 and lastname="" then<BR><BR>good luck

  3. #3
    Join Date
    Dec 1969

    Default RE: SQL syntax in ASP

    Where is the last name coming from?<BR>if from teh database then do this:<BR>If objRStest.Fields("CommonName") &#060;&#062; session ("LOGON_USER") and objRStest.Fields("lastname") = "" Then<BR>--------------------------------<BR>IF HOWEVER LAST NAME COMES FROM FORM THEN:<BR>use request("lastname")<BR>-------------------------------------<BR>Hope this helps.<BR>Good Luck.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts