borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Time field calculation)Next Topic (Call Display for recordset data not working) New Topic New Poll Post Reply
AndreaVB Forum : Database : How to copy tables from one database to another
Poster Message
crisem
Level: Guest


icon How to copy tables from one database to another

How do i copy table/s from an access database to another?

14-09-2002 at 07:31 PM
| Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: How to copy tables from one database to another

If you mean using the access program itself: Import.

Similar via code:
Use create statement to create the new table with the exact structure of the original.

then: INSERT INTO newtable SELECT * FROM oldtable

can't remember the exact structure for the latter, it should be in the help files though.


[Edited by JLRodgers on 14-09-2002 at 03:25 PM GMT]

14-09-2002 at 09:23 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
crisem
Level: Guest

icon Re: Re: How to copy tables from one database to another

I tried linking a table from informix database but when i tried and access it through asp there is no data that displays, what could be the cause of this?

quote:
JLRodgers wrote:
If you mean using the access program itself: Import.

Similar via code:
Use create statement to create the new table with the exact structure of the original.

then: INSERT INTO newtable SELECT * FROM oldtable

can't remember the exact structure for the latter, it should be in the help files though.


[Edited by JLRodgers on 14-09-2002 at 03:25 PM GMT]

16-09-2002 at 05:26 AM
| Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: How to copy tables from one database to another

If you see the data when you open the linked table (in Access). I haven't a clue offhand.

Although it may be possible to access the data directly (via ADO).

Connection Code being (from a site I found):
"Dsn='';Driver={INFORMIX 3.30 32 BIT};Host=myHostname;Server=myServerName;Service=myServiceName;Protocol=olsoctcp;Database=myDbName;UID=myUsername;PWD=myPassword;"

You could try to connect directly, if you don't get the data that way either, then they're may be a problem with the database itself (like security rights). But I've never delt with that type, so can't be certain.

16-09-2002 at 12:31 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
crisem
Level: Guest

icon Re: Re: How to copy tables from one database to another

Thanks,
Sorry if my information is incomplete, i solved the problem by changing (') to (#) in my SQL query, cause i read in a book from petroutsos that access uses this for dates query.


quote:
JLRodgers wrote:
If you see the data when you open the linked table (in Access). I haven't a clue offhand.

Although it may be possible to access the data directly (via ADO).

Connection Code being (from a site I found):
"Dsn='';Driver={INFORMIX 3.30 32 BIT};Host=myHostname;Server=myServerName;Service=myServiceName;Protocol=olsoctcp;Database=myDbName;UID=myUsername;PWD=myPassword;"

You could try to connect directly, if you don't get the data that way either, then they're may be a problem with the database itself (like security rights). But I've never delt with that type, so can't be certain.


17-09-2002 at 03:42 PM
| Quote Reply
AndreaVB Forum : Database : How to copy tables from one database to another
Previous Topic (Time field calculation)Next Topic (Call Display for recordset data not working) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder