R
ray well
i need to copy in code a table from a legacy dbase III file into an access
mdb file.
both source and destination tables have the same table names, field names,
field types, & field sizes.
the access table has an index attached to it, and starts with a empty table.
i want to avoid having to create & copy row by row from the source to the
destination table
i can copy the source table into a table with the following code. i can read
the real data from that table
--------------------------
sSqlSource = "SELECT Info.* FROM Info;"
DaSource = New OleDb.OleDbDataAdapter(sSqlSource,
DBFConnedctionToSource)
Dim t As New DataTable()
DaSource.Fill(t)
--------------------------
i open the destination table with the following code, the table is empty,
but has a index attached to itself inside the mdb file
-----------------------------
sSqlDestination = "SELECT Info.* FROM Info;"
DaDestination = New OleDb.OleDbDataAdapter(sSqlDestination,
DBFConnedctionToDestination)
DsDestination.Clear()
Dim cbDestinationDa As New OleDb.OleDbCommandBuilder(DaDestination)
DaDestination.Fill(DsDestination, "Info")
-------------------------------
i don't know how to structure the 'DaDestination.Update' code
i tired 'DaDestination.Update(t)', it executes with NO ERROR, but doesn't do
anything, no data gets copied
any idea how to get the table to copy to the destination? i would appreciate
a bit of code.
thanks for any help
ray
mdb file.
both source and destination tables have the same table names, field names,
field types, & field sizes.
the access table has an index attached to it, and starts with a empty table.
i want to avoid having to create & copy row by row from the source to the
destination table
i can copy the source table into a table with the following code. i can read
the real data from that table
--------------------------
sSqlSource = "SELECT Info.* FROM Info;"
DaSource = New OleDb.OleDbDataAdapter(sSqlSource,
DBFConnedctionToSource)
Dim t As New DataTable()
DaSource.Fill(t)
--------------------------
i open the destination table with the following code, the table is empty,
but has a index attached to itself inside the mdb file
-----------------------------
sSqlDestination = "SELECT Info.* FROM Info;"
DaDestination = New OleDb.OleDbDataAdapter(sSqlDestination,
DBFConnedctionToDestination)
DsDestination.Clear()
Dim cbDestinationDa As New OleDb.OleDbCommandBuilder(DaDestination)
DaDestination.Fill(DsDestination, "Info")
-------------------------------
i don't know how to structure the 'DaDestination.Update' code
i tired 'DaDestination.Update(t)', it executes with NO ERROR, but doesn't do
anything, no data gets copied
any idea how to get the table to copy to the destination? i would appreciate
a bit of code.
thanks for any help
ray