Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Create an Access Database with dotNet?

0 views
Skip to first unread message

JasonP

unread,
Nov 6, 2002, 10:56:05 AM11/6/02
to
I got a reply on this question (posted below) but it did not answer my
question at all. In VB6 I used ADOX to create an Access *database* (that is,
a file; I am not concerned with constructing the table at this point) with
the following code:

cat = CreateObject("ADOX.Catalog") 'New ADOX.Catalog
cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" &
Server_or_FileName)

What I want to know is: is there a way (and if so, what is it?) to do this
using dotnet native namespaces? I don't want to do late-binding, and I don't
want to import VB6 com references. I certainly *can*, and I already know how
to do that, but I would prefer to use a native dotnet method if it is
available.

Thanks!


Val Mazur

unread,
Nov 6, 2002, 5:28:17 PM11/6/02
to
Hi,

No, there is no native .NET way to create Access database.

--
Val Mazur
Microsoft MVP


"JasonP" <jas...@i.com> wrote in message
news:e70TSzahCHA.1364@tkmsftngp11...

Paul Clement

unread,
Nov 7, 2002, 8:52:57 AM11/7/02
to
On Wed, 6 Nov 2002 10:56:05 -0500, "JasonP" <jas...@i.com> wrote:

¤ I got a reply on this question (posted below) but it did not answer my

I probably posted the reply to your original message after your follow-up, but the bottom line is
that you have to continue to use ADOX (or DAO).

As Val confirmed, there is no native method.


Paul ~~~ pcle...@ameritech.net
Microsoft MVP (Visual Basic)

JasonP

unread,
Nov 7, 2002, 9:18:08 AM11/7/02
to
Thanks for the scoop guys.

"Val Mazur" <grou...@hotmail.com> wrote in message
news:O9W01OehCHA.1148@tkmsftngp11...

Jim Ferguson

unread,
Nov 7, 2002, 9:57:22 AM11/7/02
to
The minimum size of an empty MDB is pretty small. As a workaround I
would simply distribute an empty MDB with my app (it can have any name
you like.) Treat it like any other required application data file.
When you want to create a "new" database simply copy this file onto a
new name. This will work fine as long as the database doesn't need to
be created with a specific security context.


-- Jim Ferguson, FMS
remove "nospam" to reply
http://www.fmsinc.com

0 new messages