Copying Data between 2 access databases
-
hi dudes, i want to copy a table from an access database to another table on another access database in windows application using c#,what is the best solution,i dont want my application to hang while copying the data,i will be thankful. and how can i make a progress bar and relate it to this copy so it will show how much further is needed to be done.u would solve a big problem of mine by answering me,thank u all.
-
hi dudes, i want to copy a table from an access database to another table on another access database in windows application using c#,what is the best solution,i dont want my application to hang while copying the data,i will be thankful. and how can i make a progress bar and relate it to this copy so it will show how much further is needed to be done.u would solve a big problem of mine by answering me,thank u all.
1 - you can do it in another thread 2 - you can show a progress bar, but it will mean making lots of smaller copies, which will slow down the process.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
1 - you can do it in another thread 2 - you can show a progress bar, but it will mean making lots of smaller copies, which will slow down the process.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Wouldn't it have to be done row-by-row anyway? When I copy data from one table to another I use a DataReader.
-
hi dudes, i want to copy a table from an access database to another table on another access database in windows application using c#,what is the best solution,i dont want my application to hang while copying the data,i will be thankful. and how can i make a progress bar and relate it to this copy so it will show how much further is needed to be done.u would solve a big problem of mine by answering me,thank u all.
Does the table exist in the target database or do you need to create it too? Are you doing this in a WinForms application? If so, why? I do such things in Windows Services. 0) Open a connection to the source database 1) Get a count of records to copy 2) Use ExecuteReader to get a DataReader for the records to copy 3) Open a connection to the target database 4) Set up a parameterized insert statement for the target connection 5) while ( reader.Read() ) 5.1) Set the parameter values 5.2) ExecuteNonQuery 5.3) Update the ProgressBar 6) Close the reader, and both connections
-
hi dudes, i want to copy a table from an access database to another table on another access database in windows application using c#,what is the best solution,i dont want my application to hang while copying the data,i will be thankful. and how can i make a progress bar and relate it to this copy so it will show how much further is needed to be done.u would solve a big problem of mine by answering me,thank u all.
thank u all especialy u pieballconsult for ur solution,the table exists in the destination table,and one more quenstion,when i executereader my select statement for reading from the source table,how can i access each column that is being returned to set it as an parameter for the insert statement?
-
hi dudes, i want to copy a table from an access database to another table on another access database in windows application using c#,what is the best solution,i dont want my application to hang while copying the data,i will be thankful. and how can i make a progress bar and relate it to this copy so it will show how much further is needed to be done.u would solve a big problem of mine by answering me,thank u all.
dudes i found the ways to access those fields in datareader,so my last question is solved,but iv got a new problem,and that is i have a large amount of records in my database tables,so it would take a very long time for selecting and inserting into destination table row by row.how can i do that by copying the whole table at once,and insert it at once too.i might user dataset and its datatables,but it doesn't work,can anybody give me an example of filling a datatable of a dataset from connection 1,and insert that datatable into connection 2 database? thank u.