al4629740
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
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
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
ASKER
What if I am only updating the records from the db. Would INSERT still apply?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.