[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

Creating and Restructuring Local Databases with ODBC

Johnnie Norsworthy

4/8/2002 11:41:00 PM

I am using C#.

What is the best way to create a new, blank Access database? What about
restructuring an existing database (adding or removing fields)
programmatically?

I was planning on creating a default, empty database (Default.MDB) and using
it to create a new database file as needed for my customers. Later, I could
update the fields in Default.MDB, distribute it as a template, compare its
structure to the installed .MDB file structure and add or remove fields as
needed to make the two file structures the same.

Am I barking up the wrong tree here or is there another preferred way to
have this functionality?

Any links to good ODBC database connectivity examples using C#?

Thanks for any insight! I'm new to all this - even newer than most.

-Johnnie


1 Answer

Bob Beauchemin

4/9/2002 12:02:00 AM

0

Re: Creating a new access database. Probably your best bet is ADOX or DAO
through COM interop.

Re: C# Odbc samples. Except for the connection string, they should be
analogous to OleDb data provider samples. There's a bunch of those in SDK
docs and quickstarts, etc. Also, I believe someone posted a sample to this
list fairly recently.

Bob Beauchemin
bobb@develop.com


"Johnnie Norsworthy" <less@spam.4me> wrote in message
news:#zRe1X03BHA.1864@tkmsftngp04...
> I am using C#.
>
> What is the best way to create a new, blank Access database? What about
> restructuring an existing database (adding or removing fields)
> programmatically?
>
> I was planning on creating a default, empty database (Default.MDB) and
using
> it to create a new database file as needed for my customers. Later, I
could
> update the fields in Default.MDB, distribute it as a template, compare its
> structure to the installed .MDB file structure and add or remove fields as
> needed to make the two file structures the same.
>
> Am I barking up the wrong tree here or is there another preferred way to
> have this functionality?
>
> Any links to good ODBC database connectivity examples using C#?
>
> Thanks for any insight! I'm new to all this - even newer than most.
>
> -Johnnie
>
>