Convert VB.Net Datatable to Access File

E

evan.arnold

So I've used ado.net to retrieve me a data table and I want to drop
this as an mdb file. Does anyone know how to do this? Everyone seems to
be going in the reverse direction.


Thanks!
 
B

Brendan Reynolds

Rather than creating a new MDB at run-time, can you create an empty MDB at
design time and just drop/create objects (tables, indexes, relationships
etc.) in that database at run-time? The reason I ask is that all the
dropping and creating of objects can be done via SQL DDL commands (DROP
TABLE, CREATE TABLE, DROP INDEX, CREATE INDEX, etc) which you can execute
via ADO.NET. But JET SQL doesn't have any CREATE DATABASE command. For that,
you'd probably have to use DAO or ADOX via interop.

Also consider that if the aim is transfer data from some other datasource
into an MDB, there may be more efficient ways to do that - such as creating
an MDB with a local table and a link to the external data source and
executing an append query.

BTW: This newsgroup is for questions about using ADPs with SQL server, and
probably not the most appropriate newsgroup for questions about VB.NET and
JET databases (MDBs).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top