I'm trying to export a reference table from MS Access to a table via
ODBC. Is there a way I can use a DAO.Recordset and use the
value(field) to populate my ODBC table?
Dim rs as DAO.Recordset
Dim conn as New ADODB.Connectio n
Dim strsql as String
Set rs = CurrentDb.OpenR ecordset("selec t field1, field2, field3,
field4, field5.....from daotable").Open recordset
Move.First
strsql = "insert into odbctable rs.value(field1 , field2, field3,
field4, field5.....)
conn.Connection String = "dsn=Databa se ; uid=UID; pwd=password"
conn.Connection Timeout = 0
conn.CommandTim eout = 0
conn.Open
Do
conn.Execute (strsql)
rs.MoveNext
Loop Unit rs.EOF
conn.close
ODBC. Is there a way I can use a DAO.Recordset and use the
value(field) to populate my ODBC table?
Dim rs as DAO.Recordset
Dim conn as New ADODB.Connectio n
Dim strsql as String
Set rs = CurrentDb.OpenR ecordset("selec t field1, field2, field3,
field4, field5.....from daotable").Open recordset
Move.First
strsql = "insert into odbctable rs.value(field1 , field2, field3,
field4, field5.....)
conn.Connection String = "dsn=Databa se ; uid=UID; pwd=password"
conn.Connection Timeout = 0
conn.CommandTim eout = 0
conn.Open
Do
conn.Execute (strsql)
rs.MoveNext
Loop Unit rs.EOF
conn.close
Comment