Link to home
Start Free TrialLog in
Avatar of al4629740
al4629740Flag for United States of America

asked on

recordset

In vb6 I pulled up the recordset to a datagrid.  Is there a way to add records to the datagrid without accessing the db and then when I'm done adding records and making edits, then I can update the Database?

This is how I am opening the database

rec.CursorType = adOpenStatic
      rec.CursorLocation = adUseClient
      rec.LockType = adLockOptimistic
      rec.Open esql, conn, , , adCmdText


     
        Set DataGrid1.DataSource = rec
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

I would loop through the records of your recordset and emit a INSERT statement to execute against the connection object. something like http://www.vb-helper.com/howto_ado_insert.html
Avatar of al4629740

ASKER

What if I am only updating the records from the db.  Would INSERT still apply?
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial