Solved

Converting a SQL Server 2000 Database to Access 97

Posted on 2002-07-19
6
128 Views
Last Modified: 2010-05-02
Hello All

Is anyone aware whether it is possible in VB code to convert just the data tables of a SQL Server 2000 database to a Access 97 mdb file.

I wish to use a small-subset of the SQL Server database in a Access 97 format.

I look forward to a reply.

Many Thanks

Asif Mughal
0
Comment
Question by:AsifMughal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 3

Expert Comment

by:ketapillar
ID: 7165786
Use the DTS...  You can copy the data over to the other tables however some of the fields (Primary Keys will no longer be primary keys).

Enterprise Manager...

Right click on database.. choose "All Tasks -> Export" Follow the wizard.

Oh you need to create a blank access 97 database before you run it.
0
 
LVL 3

Expert Comment

by:ketapillar
ID: 7165792
Keep in mind that the stored procedures will not transfer over.  I do this with an Access 2k database however it's a dump of the tables and table data.

More than likely you will get a few errors when you run it the first couple of times... if you need help with one just tell me what the error message is....
0
 

Author Comment

by:AsifMughal
ID: 7166518
I am aware you can do this via DTS using the Enterprise but I need to do this via code, as I am using a mini version of SQL Server (MSDE).  

I would like the user to click a button and it should automaitcally do this.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Accepted Solution

by:
inthedark earned 100 total points
ID: 7167267
The problem with DTS is the indexs. Also you have a problem with Access you can only add records to a table with auto-increment if the tables empty.

So here is the process in ADO:

1) Create the destination MDB file
2) Get list of tables in SQL database
3) Open each table e.g. Select * from [table1];
4) Create a tables in the destination database
5) Use ADOX to create the keys and indexs in the mDB file.
7) For each table create a dummy table with no indexes and use longs instead of autoincrement fields.
8) Loop through source records and save the data in the desintation database
9) The use Select * Into Table1 from [dummyTable1]; to move the data into the finale table.

If you need help with any of these bits let me kniw.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8031870
Hi AsifMughal,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept inthedark's comment(s) as an answer.

AsifMughal, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 8095537
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question