[英]data transfer in vb6
i have two databases name (trial1) and (trial2) and table name studmast in trial1 and trial2. 我在trial1和trial2中有两个数据库名称(trial1)和(trial2),表名称为studmast。 I want to transfer data of studmast in trial1 to studmast in trial2.
我想将审判1中的studmast数据传输至审判2中的studmast。 can anybody help me??
有谁能够帮助我??
Generally: 通常:
INSERT INTO trial2..studmast SELECT * FROM trial1..studmast
Of course, databases can vary quite a bit, so the exact syntax will depend on things like what database product you are using. 当然,数据库可以有很大的不同,因此确切的语法将取决于您所使用的数据库产品等内容。
What part are you having a problem with? 您有什么问题? Your question is tagged VB6 - do you know how to access databases using VB6?
您的问题被标记为VB6-您知道如何使用VB6访问数据库吗?
If not, you'll probably want to use the ADO library. 如果没有,您可能要使用ADO库。 To do that, add a reference (Project->References) to "Microsoft ActiveX Data Objects Library" (choose the earliest version you have on your machine for best compatibility with other systems).
为此,向“ Microsoft ActiveX数据对象库”添加引用(“项目”->“引用”)(选择计算机上具有的最早版本,以便与其他系统最佳兼容)。
Then you can create a database connection and execute commands using the ADODB.Connection
and ADODB.Command
objects. 然后,您可以创建数据库连接并使用
ADODB.Connection
和ADODB.Command
对象执行命令。
See MSDN for examples. 有关示例,请参见MSDN 。 (There's too much to repeat here).
(这里有太多重复的内容)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.