ASP

Results 1 to 2 of 2

Thread: ASP

  1. #1
    Ameur Guest

    Default ASP

    Set Connection=Server.CreateObject("ADODB.Connection") <BR>Connection.Open "MyDsn"<BR>&#039Check for valid SalesID<BR>sql = " SELECT * FROM AE " & _<BR>"WHERE (SalesID = " & _<BR>salesID & _<BR>")"<BR>i did this code but is not working correctly in order to verify the user ID against the database.<BR>any help.<BR>I got this error<BR>Enter a vailid ID <BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e14&#039 <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression &#039SalesID =&#039. <BR><BR>

  2. #2
    Bijal Guest

    Default RE: ASP

    This is the right method to write long SQL queries:<BR><BR>Set Connection=Server.CreateObject("ADODB.Connection") <BR>Connection.Open "MyDsn"<BR>&#039Check for valid SalesID<BR>sql = " SELECT * FROM AE " <BR>sql = sql & " WHERE SalesID = " & salesID<BR><BR>where I suppose, salesID is the name of the form field for Sales ID.<BR><BR>The problem might be with --> & _<BR>It is used in VBScript. It tells VBScript that this line is continued on the next one. This method is used to break long statements.<BR><BR>Happy Programing!<BR>Bijal.

Posting Permissions

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