The text of this article is not in this database — only its details are. Read it on the old site: Transferring data from one database to another using DAO MFC classes
2 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.

cuong nqPosted Dec 14, 2006, 11:41 PM
rs1 and trs in VB is: Set trs = New ADODB.Recordset // for ms access Set rs1 = New ADODB.Recordset // for sql server My Stuck is: I want to read a table (Ms Access) and insert into another table (sql Server) with the same value. And here is code in VB: Set rs1 = New ADODB.Recordset rs1.Open "select * from " & s1, con1, adOpenDynamic, adLockOptimistic ' Populating the created table with the values If trs.EOF = False Then trs.MoveFirst Do While trs.EOF = False rs1.AddNew For i = 0 To trs.Fields.Count - 1 rs1(i) = trs(i) Next rs1.Update trs.MoveNext Loop MsgBox "Data entered successfully", vbInformation End If My problem is rs1(i) = trs(i) I write it in VC++ is m_pRecordsetMsAccess[i]=m_pRecordsetMsSQL[i] but wrong, Help me Plz