Click here to Skip to main content
15,886,058 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
hi all
this is my first thread in this forums ,

now i using adodc connection with ODBC mysql database .
how i can make the adodc read multi row at the time , not single row at the time, to speed up the process , ?
example of my work

VB
for i = 0 to adodc1.recoredset.recoredcount 
adodc2.addnew 
adodc2.recoredset.fields(0) = adodc1.recoredset.fields(0)
adodc2.recoredset.fields(1) = adodc1.recoredset.fields(1)
adodc2.update 
next i

because we need to copy table from database 1 to other database 2 .and the system process one row at the time which is slowly and i want to speed up by take multi rows .
please help me with any advice that will may speed my process ...
regards
Posted
Updated 3-Jan-12 19:37pm
v2

What I understand is,
you want to copy data from One Database Table to another Database Table,
If this is right then you can use following query.

SQL
Con_DB.Execute "INSERT INTO DB_ONE.dbo.TABLE_ONE ([Field_One],[Field_Two]) " & _
            "SELECT [Field_One],[Field_Two] " & _
            "From DB_TWO.dbo.Table_ONE"
 
Share this answer
 
or if you want to copy only conditional data from One Database Table then you can use following query with where conditon.

XML
Con_DB.Execute "INSERT INTO DB_ONE.dbo.TABLE_ONE ([Field_One],[Field_Two]) SELECT [Field_One],[Field_Two] From DB_TWO.dbo.Table_ONE 
where Field_One = '" & YourTextBox.text & "'"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900