470,831 Members | 1,997 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,831 developers. It's quick & easy.

Create access database at runtime with C#

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
Nov 17 '05 #1
3 2571
"cql90" <cq***@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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
Nov 17 '05 #2
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...
"Cletus Van Damme" <cl****@iforgot.com> wrote in message
news:ep**************@TK2MSFTNGP10.phx.gbl...
"cql90" <cq***@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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

Nov 17 '05 #3
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
"Otis Mukinfus" <Ot**********@newsgroup.nospam> wrote in message
news:6v********************************@4ax.com...
On Thu, 20 Oct 2005 08:13:59 -0t700, "cql90" <cq***@yahoo.com> wrote:
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.

"Cletus Van Damme" <cl****@iforgot.com> wrote in message
news:ep**************@TK2MSFTNGP10.phx.gbl...
"cql90" <cq***@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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

Otis

Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Nathan Bloom | last post: by
9 posts views Thread by Paul H | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.