简体   繁体   中英

data transfer in vb6

i have two databases name (trial1) and (trial2) and table name studmast in trial1 and trial2. I want to transfer data of studmast in trial1 to studmast in trial2. 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?

If not, you'll probably want to use the ADO library. 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).

Then you can create a database connection and execute commands using the ADODB.Connection and ADODB.Command objects.

See MSDN for examples. (There's too much to repeat here).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM