Ok, so I am teaching myself how to access databases using ASP. I can add records, update records, and display lots of records, but I cant seem to figure out how to access a single specific record. I am probably just missing something very simple.
I have a variable called form_id. I also have in my table a unique number called id. All I want to do is open the record where id=form_id
So I have:
sql= "Select * FROM users WHERE id="&form_id
But then my page just shows the first record, which is id 1
I had attempted an rs.Move form_id
but that command opens up the wrong record, as it is going by database record instead of the id field, from what I can tell.
Is there any way to match the database record to the one that has the correct id? ID is a primary key, so it is impossible for that to match to more than one record.
Thanks!
I have a variable called form_id. I also have in my table a unique number called id. All I want to do is open the record where id=form_id
So I have:
sql= "Select * FROM users WHERE id="&form_id
But then my page just shows the first record, which is id 1
I had attempted an rs.Move form_id
but that command opens up the wrong record, as it is going by database record instead of the id field, from what I can tell.
Is there any way to match the database record to the one that has the correct id? ID is a primary key, so it is impossible for that to match to more than one record.
Thanks!