Home All Groups Group Topic Archive Search About

VB.Net code to upsize Access DB to SQL Express?

Author
9 Feb 2006 11:10 PM
Holysmokes99@hotmail.com
Hello, All

I would like to write a VB.Net app that will take an Access 2000
database that has tables, relationships, and data (no queries, forms
macros, etc), and create a corresponding SQL
Express database that matches it. The application will have no idea of
what's in the database ahead of time other than the fact that there are
tables with data and relationships. Any suggestions on how to proceed?
I suppose I need to iterate through the Access tables and
relationships, but I am not sure how this is done. Once I can do this,
I imagine that it is fairly straight forward to create the data objects
in SQL Express using ADO.Net.

Thanks for any suggestions,
Marcus

Author
10 Feb 2006 12:02 AM
Kerry Moorman
Marcus,

If you just need to get the Access database converted to SQL Server, the
Access upsizing wizard will do this for you.

Kerry Moorman


Show quoteHide quote
"Holysmoke***@hotmail.com" wrote:

> Hello, All
>
> I would like to write a VB.Net app that will take an Access 2000
> database that has tables, relationships, and data (no queries, forms
> macros, etc), and create a corresponding SQL
> Express database that matches it. The application will have no idea of
> what's in the database ahead of time other than the fact that there are
> tables with data and relationships. Any suggestions on how to proceed?
> I suppose I need to iterate through the Access tables and
> relationships, but I am not sure how this is done. Once I can do this,
> I imagine that it is fairly straight forward to create the data objects
> in SQL Express using ADO.Net.
>
> Thanks for any suggestions,
> Marcus
>
>
Author
10 Feb 2006 12:50 AM
holysmokes99
Thanks for your response, Ken. The thing is, this needs to be done
behind the scenes without any user input except for pointing to the mdb
file, and the location and username/password for the SQL Express
database. I wonder if the upsizing wizard can be embedded in my code,
or is exposed through COM. Hmmm...

M.
Author
10 Feb 2006 6:19 AM
Cor Ligthert [MVP]
Hi,

This is new for Net 2.0 however that is SQL Express as well, See this sample
about factory

http://www.vb-tips.com/default.aspx?ID=8c3dc2d7-1232-4dd1-817e-22eaaebb2723

I hope this helps,

Cor