Hi all,
THIS IS A SAMPLE CODE USING ADO WITH ACCESS 97.
I WANT TO USE THE SAME CODE WITH DAO.
HOW TO WRITE THE CODE :
Dim Conn as connection, Rs1 as recordset, Rs2 as recordset
Set Conn = new Connection
Conn.Open YourConnectionString
Set Rs2 = new recordset
Rs2.open "t2", YourConn, adOpenKeyset, adLockOptimistic, adCmdTable
Set Rs1 = new recordset
Rs1.open "select code,libelle from t1"
If not R1.eof and not Rs1.bof then
Rs1.movefirst
while not rs1.EOF
Rs2.addnew array("code","libelle"
,array("'" & NewCode & "'","'" & NewLibelle & "'"
rs1.MoveNext
wend
Rs2.update
else
msgbox "No entries to process"
end if
rs1.Close
set Rs1 = nothing
Rs2.close
Set Rs2= nothing
Thanks in advance for your answer.
Palmero.
THIS IS A SAMPLE CODE USING ADO WITH ACCESS 97.
I WANT TO USE THE SAME CODE WITH DAO.
HOW TO WRITE THE CODE :
Dim Conn as connection, Rs1 as recordset, Rs2 as recordset
Set Conn = new Connection
Conn.Open YourConnectionString
Set Rs2 = new recordset
Rs2.open "t2", YourConn, adOpenKeyset, adLockOptimistic, adCmdTable
Set Rs1 = new recordset
Rs1.open "select code,libelle from t1"
If not R1.eof and not Rs1.bof then
Rs1.movefirst
while not rs1.EOF
Rs2.addnew array("code","libelle"
rs1.MoveNext
wend
Rs2.update
else
msgbox "No entries to process"
end if
rs1.Close
set Rs1 = nothing
Rs2.close
Set Rs2= nothing
Thanks in advance for your answer.
Palmero.