i have 2 table in my database access 1 is temporary and the second one is temporary2, how can i save all the data in temporary to temporary2? im using adodb.
try this code...
rs.Open "select * from temporary1", gcn
gcn.Execute "delete from temporary2"
If rs.RecordCount > 0 Then
While Not rs.EOF()
gcn.Execute "insert into temporary2(roll,name,address) values('" & rs!roll & "','" & rs!Name & "','" & rs!address & "')"
If rs.State = adStateOpen Then rs.Close
Set rs = Nothing
where gcn is the connection and rs is the recordset object respectively....replace these with your objects....
check out the statement which is marked as red...this is the sql statement you need to modify according to the fields you have in your tables....this statement will extract one row from temporary1 table and insert it to temporary2 table...
hope this helps....get me a feedback if this works out...