ADO.NET has it's own implementation, DataSet, for creating
temp/in-memory databases, so I strongly believe that you can't create
mdb database with it (at least not same way as with ADO 2.x). But if you
are able to cope with that, then...just do it. =3D)
But if you do need that functionality in .NET, you can do it by
importing ADO 2.x into your .NET projects in VS.NET. It gives you ADODB
namespace and relevant classes to use ADO 2.x in .NET. But is it
reasonable to just copy same ADO-handling code into .NET application,
that thing you have to decide.
And second thought:
1. You could have one empty mdb file somewhere on your server available
for use in your .NET application.
2. When you have to create mdb file (I presume you could create objects,
tables etc in it with SQL also) you always create a copy of the mdb file
there where you need that mdb (rename the file as needed)
3. After that create needed objects into db with SQL(connect with
OleDbProvider and run SQL scripts) (With Jet provider 4.0 you really are
able to create tables,procedures and views in Access db via code,
consult Access's Jet SQL reference for details.). If I remember right,
this demands at least Access 2000.
4. After this you have created your own mdb as a result.
If someone else knows more elegant solution, I am also all ears.
Teemu Keiski
-----Alkuper=E4inen viesti-----
L=E4hett=E4j=E4: Rami Kudmani [mailto:rami2k@p...]
L=E4hetetty: 25. toukokuuta 2002 16:47
Vastaanottaja: ADO.NET
Aihe: [ado_dotnet] Creating MDB Databases using ADO.NET
I used to create my Access Databases using ADO (Catalog object) in my
applications, but now, i couldn't find a way to create MDB database
using
ADO.NET, that means i couldn't let my application create databases
dynamicaly at run-time, and i must create them using ADO 2.x.
Is there any wat to create databases using ADO.NET ( OleDbProvider )?