P
PO
Hi,
I use a recordset (rs) to extract records from a table. I then append the
records to an other table by looping through the recordset (se code below):
rs.Open "SELECT RECNUM, DESCRIPTION FROM TEST WHERE RECNUM
in('103668','101687','108009')", cn '(TEST is a table in an external DB)
Do While Not rs.EOF
DoCmd.RunSQL "INSERT INTO MAXDATA VALUES(" & _
'(MAXDATA is a local Access DB)
Chr(34) & rs!RECNUM & Chr(34) & ", " & Chr(34) & rs!Description
& Chr(34) & ");"
rs.MoveNext
Loop
This works fine until the data in the Description field contains a "-sign.
Is there an other way to append the rs recordset to the MAXDATA-table?
Is it possible to append the whole recordset to the MAXDATA-table in one
transaction, for instance MAXDATA.Append rs
Kind regards
PO
I use a recordset (rs) to extract records from a table. I then append the
records to an other table by looping through the recordset (se code below):
rs.Open "SELECT RECNUM, DESCRIPTION FROM TEST WHERE RECNUM
in('103668','101687','108009')", cn '(TEST is a table in an external DB)
Do While Not rs.EOF
DoCmd.RunSQL "INSERT INTO MAXDATA VALUES(" & _
'(MAXDATA is a local Access DB)
Chr(34) & rs!RECNUM & Chr(34) & ", " & Chr(34) & rs!Description
& Chr(34) & ");"
rs.MoveNext
Loop
This works fine until the data in the Description field contains a "-sign.
Is there an other way to append the rs recordset to the MAXDATA-table?
Is it possible to append the whole recordset to the MAXDATA-table in one
transaction, for instance MAXDATA.Append rs
Kind regards
PO