MS Access Copy Table And Data

MS Access Copy Table And Data

am 31.05.2005 03:34:13 von mgreenway

I am in the process of merging approximately 5 databases for
development into 1 final database but will for the new merged copy to
go live I need to copy over all the data on a live server using a
single asp script.

In access I can do a copy and paste using structure and data.

How can I do this using ASP?

The problem with creating and populating simply i need the autonumbers
to remain the same.


Thanks for your help

MGREENWAY

Re: MS Access Copy Table And Data

am 31.05.2005 13:12:56 von reb01501

mgreenway@gmail.com wrote:
> I am in the process of merging approximately 5 databases for
> development into 1 final database but will for the new merged copy to
> go live I need to copy over all the data on a live server using a
> single asp script.
>

Why? ASP is for production, not for setting up production. This really
sounds like a task that should be done offline. It's a one-time task, isn't
it? Why does it need to be done via an asp script? VBA really sounds like
the way to go here.

Is the problem that Access will not be installed on the server? If so,
create your production database in your development environment and then
transfer the database to the production server.

Instead of copying the tables, why not create a database with links to the
tables in the 5 databases to be merged?


> In access I can do a copy and paste using structure and data.
>
> How can I do this using ASP?
>
> The problem with creating and populating simply i need the autonumbers
> to remain the same.
>
Here is a link to some VBA code that copies tables from one database to
another using ADOX. You can easily translate this to vbscript if you really
need to do it in ASP.


Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: MS Access Copy Table And Data

am 31.05.2005 23:20:04 von mgreenway

You have convinced me with the VBA.


Linked tables in my experience are dramatically slower and will not be
able to do the database crunching I am attempting in appropriate time.


I only have one issue. you seem to have forgotten the link you said
you would put in.

Re: MS Access Copy Table And Data

am 31.05.2005 23:52:58 von reb01501

mgreenway@gmail.com wrote:
> You have convinced me with the VBA.
>
>
> Linked tables in my experience are dramatically slower and will not be
> able to do the database crunching I am attempting in appropriate time.
>
>
> I only have one issue. you seem to have forgotten the link you said
> you would put in.

Damn! Now I have to google for it again. Let's see ... copy table ADOX ...
ah! Here it is!
http://www.tek-tips.com/faqs.cfm?fid=3859


Actually, this is the hard way. If you're going to do this in a VBA module,
you should use the DoCmd.TransferDatabase method. Let me see if i can find
an article about that ... Hmm, there's not a lot. It's pretty
straightforward - you can find info about it in Access online help. Maybe
this one ...
http://www.woodyswatch.com/Access/archtemplate.asp?5-04

You can find more help for this if you need it in an Access newsgroup.

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.