Create access database at runtime with C#

  • Thread starter Thread starter cql90
  • Start date Start date
C

cql90

Hi all PRO,

I don't know how to create the MSAccess database in the runtime with C#, Are
there any body know how to do this? I am pretty sure that all of you know
how to do it, except me :( . Thanks you so much in advance, I am deeply
appreciated for your help. Take care and have a good one...

Kate
 
cql90 said:
Hi all PRO,

I don't know how to create the MSAccess database in the runtime with C#,
Are there any body know how to do this? I am pretty sure that all of you
know how to do it, except me :( . Thanks you so much in advance, I am
deeply appreciated for your help. Take care and have a good one...

Kate

If you want to create the database at runtime, you can do this via the ADOX
com library. Search this group to find code examples of this is done. An
alternative is to create the database at design time, embed the .mdb
database file as a resource in your assembly and extract it at runtime. I
used this approach on a recent project and it worked quite well. If you
need code examples of how this is done, I'd be happy to post one.

CVD
 
Dear Cletus Van Damme,

You are so quick, unbelievable, thanks you so so much, I am greatly
appreciated. I am kind of know how to do with ADOX, but I would like to
learn how to do straight like CREATE DATABASE command, some thing like that
and also, I would like to try out OleDbCommand, OleDbDataAdapter, etc; Take
care and have a nice day...
 
Dear Cletus Van Damme,

You are so quick, unbelievable, thanks you so so much, I am greatly
appreciated. I am kind of know how to do with ADOX, but I would like to
learn how to do straight like CREATE DATABASE command, some thing like that
and also, I would like to try out OleDbCommand, OleDbDataAdapter, etc; Take
care and have a nice day...
Kate,

Cletus has told you the only two ways I know of to do what you inquire about.

I have done it both ways myself and prefer using a pre constructed database. But
I don't include mine as a resource. I just put a template DB in a folder and
copy it when I want a new copy of it.
Otis
 
Dear Otis,

Thanks you very much for your responded, I am greatly appreciated. The
reason I need to create database at runtime is incase the user lost the
database, and some information is very credential, we don't want the user to
search for it, therefore we create the database at runtime and then deleted
right away. Take care and have a nice day...

Kate
 
Back
Top