Convert VB.Net Datatable to Access File

  • Thread starter Thread starter evan.arnold
  • Start date Start date
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!
 
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).
 
Back
Top