Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Converting Access97 to Access2000 database programatically


Message #1 by "Beata Chrulkiewicz" <moominek@h...> on Fri, 18 Jan 2002 21:13:05
Hi,



I was wondering if anybody knows if this is even possible.

I have a VB6 application that is using a database in Access97 format. We 

want to switch to Access2000 now, but there are all those people using our 

app with the Access97 database. So we need some tool that would migrate 

their databases for them. Which means that we want some way of migrating 

Access97 database to Access2000 format without opening the Access and 

going through the "Convert Database" utility. 



Does anybody know if there is some utility that could be used through 

function call from VB to do the job? 

The only think I can think of is to suck the data out of the old database 

and copy it into the newly-created Access2000 database but this is a lot 

of work that I do not want to do.

Anybody has a better idea?



Thanks a lot,



Beata

Message #2 by Walt Morgan <wmorgan@s...> on Fri, 18 Jan 2002 15:14:54 -0600
Beata,



One of the things you will need to concern yourself with is your vb code

reference. I believe you will need to set a reference to DAO 3.6 or higher

in order to access an Access2K MDB.



I, too, have an application developed with VB6 and Access97, so I'll follow

the comments made to you.



Good luck,



Walt





Message #3 by "David Carnley" <dcarnley@a...> on Fri, 18 Jan 2002 21:55:45
It is not an automatic cut-over from 97 to 2000, there are differences to 

resolve in many areas.  My idea is, create / convert a 2000 version of 

your app and test it completely. Create another mdb that holds conversion 

procedures.  If all you';ve changed is conversion of versions, you should 

be able to map pretty directly from an existing 97 version of your app's 

tables into the 2000 version's tables.  From the conversion mdb open the 

old and new mdbs and copy the data over.  This can easily be done.  Now, 

you can supply your existing customers with the new mdb and the conversion 

mdb and it can be executed by them one time and from then on they use the 

new 2000 version.



Hope this Helps!



David
Message #4 by "Randy Cornish" <rlcornish@c...> on Sat, 19 Jan 2002 02:52:43
Yes.  Make a reference to Jet 4.0 (DAO 3.6).  Make a call to 

DBEngine.CompactDatabase.  Use the dbVersion40 built-in constant as the 

4th parameter.  This is explained more thoroughly in Microsoft Q bulletin 

Q243252.



R



I was wondering if anybody knows if this is even possible.

> I have a VB6 application that is using a database in Access97 format. 

We 

> want to switch to Access2000 
Message #5 by "Beata Chrulkiewicz" <moominek@h...> on Mon, 21 Jan 2002 14:23:33
Randy, 



Thank you so much. I tried the code from Microsoft page, it worked. I 

still want to do some more testing, but the database opens, the version 

prints correctly and I can add a table from vb. So I think it will be OK :)



Here is the link to that Microsoft article for those who want to check it 

out:



http://msdn.microsoft.com/library/default.asp?url=/library/en-

us/dndao/html/daotoadoupdate_topic6.asp



Beata






  Return to Index