PC Review


Reply
Thread Tools Rate Thread

Copying access objects using .net

 
 
=?Utf-8?B?Qm9i?=
Guest
Posts: n/a
 
      21st Jul 2005
How do I program vb.net to copy a query or table from one MS Access database
to another?

I'd like to accomplish what import does when it copies Access objects
(primarily queries but some tables) from another database into the database
where the import action is selected---EXCEPT that I'd like to do this
externally with a VB.net program.

--
Thanks, Bob
 
Reply With Quote
 
 
 
 
Paul Clement
Guest
Posts: n/a
 
      21st Jul 2005
On Thu, 21 Jul 2005 02:55:07 -0700, Bob <(E-Mail Removed)> wrote:

¤ How do I program vb.net to copy a query or table from one MS Access database
¤ to another?
¤
¤ I'd like to accomplish what import does when it copies Access objects
¤ (primarily queries but some tables) from another database into the database
¤ where the import action is selected---EXCEPT that I'd like to do this
¤ externally with a VB.net program.

There are two options. You can use automation with Access and the TransferDatabase method for DoCmd:

http://support.microsoft.com/default...b;en-us;298174

Or, you can write code to recreate the objects in the destination database, which would require a
lot more work but can be done with ADO.NET.


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Reply With Quote
 
=?Utf-8?B?Qm9i?=
Guest
Posts: n/a
 
      21st Jul 2005
Paul, thank you for your reply.

I have 11 users for this app, each in a different location. I have a vb.net
app which is used by each user to modify his/her respective Access data base.

Each time a user installs the latest version/release of the app, he/she gets
an updated program, an updated xml report file, and an updated test database.

The test database contains new queries that are used by new reports.

My problem is to get these new queries into the respective production
databases by having the user click on a button to do so.

So I'm relegated to doing this using ADO.net.

Could you give me a jump start?
--
Thanks, Bob


"Paul Clement" wrote:

> On Thu, 21 Jul 2005 02:55:07 -0700, Bob <(E-Mail Removed)> wrote:
>
> ¤ How do I program vb.net to copy a query or table from one MS Access database
> ¤ to another?
> ¤
> ¤ I'd like to accomplish what import does when it copies Access objects
> ¤ (primarily queries but some tables) from another database into the database
> ¤ where the import action is selected---EXCEPT that I'd like to do this
> ¤ externally with a VB.net program.
>
> There are two options. You can use automation with Access and the TransferDatabase method for DoCmd:
>
> http://support.microsoft.com/default...b;en-us;298174
>
> Or, you can write code to recreate the objects in the destination database, which would require a
> lot more work but can be done with ADO.NET.
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
>

 
Reply With Quote
 
Paul Clement
Guest
Posts: n/a
 
      22nd Jul 2005
On Thu, 21 Jul 2005 09:03:41 -0700, Bob <(E-Mail Removed)> wrote:

¤ Paul, thank you for your reply.
¤
¤ I have 11 users for this app, each in a different location. I have a vb.net
¤ app which is used by each user to modify his/her respective Access data base.
¤
¤ Each time a user installs the latest version/release of the app, he/she gets
¤ an updated program, an updated xml report file, and an updated test database.
¤
¤ The test database contains new queries that are used by new reports.
¤
¤ My problem is to get these new queries into the respective production
¤ databases by having the user click on a button to do so.
¤
¤ So I'm relegated to doing this using ADO.net.
¤
¤ Could you give me a jump start?

It might help to take a look at the Jet DDL SQL you can use to create table and query (Views and
Procedures) database objects:

http://msdn.microsoft.com/library/de.../acfundsql.asp
http://msdn.microsoft.com/library/de...l/acintsql.asp
http://msdn.microsoft.com/library/de...l/acadvsql.asp


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
To prevent copying the objects of the access database Nandini Microsoft Access Security 4 11th Dec 2008 01:35 AM
copying an arraylist of objects into an array of the objects themselves. hazz Microsoft C# .NET 5 18th Nov 2005 04:19 PM
copying access objects from file to file. =?Utf-8?B?Q2hyaXM=?= Microsoft Access Forms 0 24th Aug 2005 04:36 PM
Copying access objects using .net =?Utf-8?B?Qm9i?= Microsoft Dot NET 2 21st Jul 2005 09:07 PM
Copying access objects using .net =?Utf-8?B?Qm9i?= Microsoft Access Queries 0 21st Jul 2005 11:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:10 PM.