More Help With SQL & ACCESS

Results 1 to 2 of 2

Thread: More Help With SQL & ACCESS

  1. #1
    Join Date
    Dec 1969

    Default More Help With SQL & ACCESS

    To Anyone, I am a newbie to ASP & SQL stuff. I am trying to develop an ASP application in<BR>which a person can delete records from a database<BR>I seem to be having problems making the query recognize<BR>variables. This is the SQL statement that I have<BR>Query = "SELECT * FROM project WHERE Job=" & Request("jobnum")<BR>I have tried several different variations in this code but no luck.<BR><BR>jobnum is a NUMBER that is entered in by the user on a form.<BR>This number is generated by MS Access (Autonumber) and is not<BR>a primary key<BR><BR>how can I get "Job" to recognize the variable jobnum entered from the form?<BR><BR>Thanks a TON!!!

  2. #2
    Join Date
    Dec 1969

    Default RE: More Help With SQL & ACCESS

    the correct syntax would be like this:<BR><BR>if the form action method is get then you would use:<BR>request.querystring("name of form input feild")<BR><BR>if the form action method is post then you would use:<BR>request.form("name of form input feild")<BR><BR>I usually take the form input and put it into a variable at the top of my asp page, like this: myvariable=request.form("form field name")<BR>Then you just use that variable in you SQL.<BR>Hope this helps.

Posting Permissions

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