Solved

Converting a SQL Server 2000 Database to Access 97

Posted on 2002-07-19
6
123 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
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now