AspValidation

Results 1 to 5 of 5

Thread: AspValidation

  1. #1
    Ameur Guest

    Default AspValidation

    I want the user to enter his ID in order to see his information i the database.<BR>1.How I do that by validating his Id ,if the ID exists then display info from a tables otherwise display a message to renter his correct ID.<BR>Please Help.

  2. #2
    Ian Stallings Guest

    Default RE: AspValidation

    Here try this:(of course make the appropriate changes<BR>like dsn, Users table, etc)<BR><BR>&#060;%<BR><BR>strID = request.Form("id")<BR>Set oConn = Server.CreateObject("ADODB.Connection")<BR>oConn.O pen "DSN=;uid=;pwd="<BR>sql = "SELECT id FROM Users WHERE id=&#039" & strID & "&#039"<BR>Set oRs = oConn.execute(sql)<BR><BR>If oRs.EOF Then<BR><BR>response.redirect("http://whatever/default.asp")<BR>&#039or you can display login box here<BR><BR>Else<BR><BR>&#039display table code here<BR><BR>End If<BR>&#037;&#062;<BR><BR>I hope this helps.<BR><BR>Ian

  3. #3
    Ameur Guest

    Default RE: AspValidation

    Hi Ian I&#039m recieving this error Data source name not found and no default driver specified <BR>eventhough I did the DSn.<BR>Thanks

  4. #4
    Ameur Guest

    Default RE: AspValidation

    Hi Ian I&#039m recieving this error Data source name not found and no default driver specified <BR>eventhough I did the DSn.<BR>Thanks


  5. #5
    Ian Stallings Guest

    Default RE: AspValidation

    This is a basic connection error. i would verify<BR>that everything is correct like:<BR>dsn<BR>username<BR>password<BR><BR>then make sure the DSN is specifying the correct path, etc.<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
  •