J
JM
i have an Access app with about 15k rows that will slowly grow (this is
about a two years of data so far) indefnitely. The table structure is
horrible in the access design (can not be changed, its a third party
app) so on the sql side the table structure is totally different. What
i need to do is pull out all these rows and compare them indvidually
with the rows in sql and then update or insert into sql server table. I
am trying to figure out the best way to do this to make it as fast and
efficient as possible. I don't think dts is an option becuase the table
structures are so different, the dts process would have to be really
complex so i don't see the point. Here are the two scenarios i came
with in a .net environment.
1) ado.net all the way >>>load the data from access into a datareader,
load the data from sql into a dataset using a dataadapter to bind it to
the sql server. iterate through the access reader, for each row,
evaluate it against the dataset/table and either update, insert, or
leave it alone. do this for every row in the data reader. resynch the
data back to sql from the adapter.
2) individiaul sql statements >>> loop through the datareader, run a sql
statement against sql and see if the row exists, or needs to be updated,
run an insert or update statement against sql server and do this for
each row in the access datareader.
about a two years of data so far) indefnitely. The table structure is
horrible in the access design (can not be changed, its a third party
app) so on the sql side the table structure is totally different. What
i need to do is pull out all these rows and compare them indvidually
with the rows in sql and then update or insert into sql server table. I
am trying to figure out the best way to do this to make it as fast and
efficient as possible. I don't think dts is an option becuase the table
structures are so different, the dts process would have to be really
complex so i don't see the point. Here are the two scenarios i came
with in a .net environment.
1) ado.net all the way >>>load the data from access into a datareader,
load the data from sql into a dataset using a dataadapter to bind it to
the sql server. iterate through the access reader, for each row,
evaluate it against the dataset/table and either update, insert, or
leave it alone. do this for every row in the data reader. resynch the
data back to sql from the adapter.
2) individiaul sql statements >>> loop through the datareader, run a sql
statement against sql and see if the row exists, or needs to be updated,
run an insert or update statement against sql server and do this for
each row in the access datareader.