VB & SQL - Verify Password stored in SQL from VB and show that particular record of that password in VB Form.

I need my visual basic application to show me the record of a specified ID or password stored in SQL...
I can connect and view the files and so on.... but i cant seem to specify the record that i want to view...
For example... I need to type in the ID which is 99999 in visual basic...
Then it must look up in SQL for that ID and show me the record for that ID only....
If possible, I should edit, or delete the record....

I am using VB6 and MS SQL 7...
I really need the code in visual basic to complete my task...

Hope you can HELP ME
Thank You So Much...




icefxAsked:
Who is Participating?
 
YsgratheConnect With a Mentor Commented:
have you tried running a query that filters for the record id? I am assuming you are not very familiar with MS-SQL so i will avoid stored procedures for the moment.

simply do a
'SELECT * from tblMyTable where MyID=99999'

personally i would not allow editing of the record set returned.

i would let the users edit the results on the form, and when done they would hit the update button and it would execute the equivalent of a
'UPDATE tblMyTable set field1=value1,field2=value2, etc
WHERE MyID=99999'

and i would do a similar approach for a delete record.
0
 
PiterCommented:
you have to use Privileges in your database.
else
you can declear userid as public in ur Module and check it in all forms.As it is decleared as public it will be available in all forms.
 then on form_load you can check for userid and can display replated records for that USER_ID.
 
in MODULE :
 public useid as String.

in form :
 if userid = "999999" then
    Display records those you want to get from database.
 end if

 
0
 
cerebralpcCommented:
icefx,
No comment has been added lately (141 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Award points to Ysgrathe http:#8165934

Please leave any comments here within 7 days.

-- Please DO NOT accept this comment as an answer ! --

Thanks,

cerebralpc
EE Cleanup Volunteer

http://www.experts-exchange.com/Q_20555923.html
0
All Courses

From novice to tech pro — start learning today.