Results 1 to 6 of 6

Thread: How to pass values from SQL to ASP.Net?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    108

    Red face How to pass values from SQL to ASP.Net?

    Hi,

    I am making a login web service. First a database is created. It has ID,username and password attributes.

    I plan to use the SELECT statement to retrieve the user record from the database.

    How do I enable the ASP.Net code to check the password attribute value returned by the SELECT statement?

    And if there is no record found, what value does the SELECT statement return and how to make ASP.Net know about this value?

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: How to pass values from SQL to ASP.Net?

    1. Why should your SELECT statement return the password? It needs to accept the password and compare it against the value stored in the database.

    2. If no records are found, your dataset's table should have 0 rows in it.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    108

    Re: How to pass values from SQL to ASP.Net?

    How do I use SQL statements to compare the passwords?

    And if there is a mismatch or match, how does the ASP.Net code know about it?

  4. #4
    Lively Member lekhuyen's Avatar
    Join Date
    May 2006
    Posts
    80

    Re: How to pass values from SQL to ASP.Net?

    what type of your database is? It can be very easy if you use SQL Server

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: How to pass values from SQL to ASP.Net?

    http://www.daniweb.com/techtalkforums/thread19303.html

    (I was going to explain it, but I came across this page and couldn't believe someone had written a tutorial for this.)

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    108

    Re: How to pass values from SQL to ASP.Net?

    heh heh......good link....tk!

Posting Permissions

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



Click Here to Expand Forum to Full Width