sonu
sonu

Reputation:

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??

Upvotes: 0

Views: 223

Answers (2)

Gary McGill
Gary McGill

Reputation: 27556

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).

Upvotes: 0

RBarryYoung
RBarryYoung

Reputation: 56785

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.

Upvotes: 2

Related Questions