turfbult
Aug 21st, 2000, 04:51 AM
Hello all,
I am not quite sure how to use the recordset....
I set up a database (test) with a table (client) in MS Access. I now want to enter details from a form and update the client table with those details. I bind my objects on the form to the tablefields and then want to use something like rsrecord.addNew or rsRecord.Update, BUT my recordset must first be opened and this is where my problem is!!! To open my recordset I'll do something like..
rsRecord.Open ("select * from client")
Now I can use the rsRecord.AddNew and rsRecord.Update etc, but this cannot be right because it will take so long to select * from client (especially if it is a huge table) that NO user will want to use it.
My questions..
1.) How do you open a recordset without having to waste time etc by selecting * from client or for that matter only selecting ONE record from client??
2.) Are my steps right... rsrecord.open(select * from client) and the I can use the other rsrecord.?? features??
3.) Do I only open and close the recordset ONCE or each time I want to use it??
PLEASE help as this has been troubling me since I started using VB (admittedly not too long ago!!!)
Thanks.
I am not quite sure how to use the recordset....
I set up a database (test) with a table (client) in MS Access. I now want to enter details from a form and update the client table with those details. I bind my objects on the form to the tablefields and then want to use something like rsrecord.addNew or rsRecord.Update, BUT my recordset must first be opened and this is where my problem is!!! To open my recordset I'll do something like..
rsRecord.Open ("select * from client")
Now I can use the rsRecord.AddNew and rsRecord.Update etc, but this cannot be right because it will take so long to select * from client (especially if it is a huge table) that NO user will want to use it.
My questions..
1.) How do you open a recordset without having to waste time etc by selecting * from client or for that matter only selecting ONE record from client??
2.) Are my steps right... rsrecord.open(select * from client) and the I can use the other rsrecord.?? features??
3.) Do I only open and close the recordset ONCE or each time I want to use it??
PLEASE help as this has been troubling me since I started using VB (admittedly not too long ago!!!)
Thanks.