ASP self learning

Results 1 to 2 of 2

Thread: ASP self learning

  1. #1
    Ameur Guest

    Default ASP self learning

    I have a an entry form that conatain A user ID which when he enterd a number that exists in access database.<BR>1.How I can validate the ID against the database?<BR>2.How to display the use information and detail information for each user based in the entry of the ID of each USER.<BR>Plase help.

  2. #2
    Join Date
    Dec 1969

    Default RE: ASP self learning

    Okay for part 1:<BR>build the SQl statement something like this...<BR>I&#039m assuming that id is the name of the column in the Access Database and that Table is the name of the table itself. I&#039m also assuming that you&#039re sending the data from the HTML page via the post method.<BR>SQLstr = "SELECT id FROM table WHERE id = " & request.form("id")<BR>then check the record to see if there is any data in it.<BR>if record.RecordCount &#060;> 0 then<BR> &#039do what it is that you want to do<BR>else<BR> alert("you do not have a valid id")<BR>end if<BR><BR>the second question is actually much eaiser in theory if not in practice. You can either have values stored in the Access database that are matched to each of the id numbers, or a more elegant way is through cookies. Read this article by Ian Stallings for more informaiton:<BR>

Posting Permissions

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