Extracting from an ADO datasource to Access MDB.

  • Thread starter Thread starter Byron Hopp
  • Start date Start date
B

Byron Hopp

We have the need to extract data from an ADO dataset to an Access MDB. We
have this working be having an empty MDB that we copy and utilize for the
extract. We get errors on an irregular basis. What would be the best
practice to provide this to a user in an MDB format. Is there something
like ADOX in .net? Any ideas?

Thanks,

Byron...
 
We have the need to extract data from an ADO dataset to an Access MDB.
We have this working be having an empty MDB that we copy and utilize
for the extract. We get errors on an irregular basis. What would be
the best practice to provide this to a user in an MDB format. Is
there something like ADOX in .net? Any ideas?


You could use the ADO.NET OLEDB jet driver to access the Access DB in .NET.

What sort of errors are you getting?
 
Good question, I will get the exact message and post. How do you perform
ADOX like operations in .net like:

Create an empty MDB
Create an Empty table in that MDB.
Create fields for the table.
Set up indexes

I have not found, or have overlooked these features in ADO.NET.

Thanks,

Byron Hopp
 
Good question, I will get the exact message and post. How do you
perform ADOX like operations in .net like:

Create an empty MDB
Create an Empty table in that MDB.
Create fields for the table.
Set up indexes

I have not found, or have overlooked these features in ADO.NET.

I don't think the .NET driver supports creation of an empty MDB.

To create tables, I believe standard SQL should work.
 
Stan,

Here are the two errors we get when we attempt to extract to an MDB.

Exception of type System.OutOfMemoryException was thrown.

Unspecified Error

Doesn't help much but do you have any ideas?

Thanks,

Byron...
 
Good question, I will get the exact message and post. How do you perform
ADOX like operations in .net like:

Create an empty MDB
Create an Empty table in that MDB.
Create fields for the table.
Set up indexes

I have not found, or have overlooked these features in ADO.NET.

Thanks,

Byron Hopp

[snip]

Byron,

You can use ADODB from within .NET. Just add a reference to the ADODB
dll from the add reference menu item. After doing that you can do the
creation with ADODB. You can also use DAO from .NET in the same way.

I use DAO from .NET to run the compact and repair process from several
..NET app's that use access DBs, although when creating new DBs I just
copy a template.

Otis Mukinfus
http://www.otismukinfus.com
http://www.tomchilders.com
 
¤ Good question, I will get the exact message and post. How do you perform
¤ ADOX like operations in .net like:
¤
¤ Create an empty MDB
¤ Create an Empty table in that MDB.
¤ Create fields for the table.
¤ Set up indexes
¤
¤ I have not found, or have overlooked these features in ADO.NET.
¤

You need ADOX (or DAO) to create an Access database. Of course you could always just start off with
an empty Access database.

For working with Jet objects you can use Jet SQL (DDL and DML):

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/html/acfundsql.asp


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Back
Top