mutli行从datagrid复制到其他datagrid vb6 [英] mutli rows copy from datagrid to other datagrid vb6
本文介绍了mutli行从datagrid复制到其他datagrid vb6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨所有
这是我在这个论坛的第一个帖子,
现在我使用adodc连接ODBC mysql数据库。
我怎么能让adodc当时读取多行,而不是当时的单行,以加快这个过程,?
我工作的例子
for i = 0 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
因为我们需要将数据库1中的表复制到其他数据库2。系统处理的时间很慢,我希望通过多行加速。
请帮助我提出任何可能加快我的流程的建议...
关于
解决方案
我理解的是,
你想将数据从一个数据库表复制到另一个数据库表,
如果这是正确的,那么你可以使用以下查询。
Con_DB。执行 INSERT INTO DB_ONE.dbo.TABLE_ONE([Field_One],[Field_Two]) & _
SELECT [Field_One],[Field_Two]& _
来自DB_TWO.dbo.Table_ONE
或者如果你只想复制一个数据库表中的条件数据,那么你可以使用以下查询条件。
Con_DB.ExecuteINSERT INTO DB_ONE.dbo.TABLE_ONE([Field_One],[Field_Two])SELECT [Field_One],[Field_Two]来自DB_TWO.dbo.Table_ONE
其中Field_One ='& ; YourTextBox.text& '
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
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
解决方案
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.
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"
or if you want to copy only conditional data from One Database Table then you can use following query with where conditon.
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 & "'"
这篇关于mutli行从datagrid复制到其他datagrid vb6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文