Extracting from an ADO datasource to Access MDB.

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...
 
G

Guest

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?
 
B

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.

Thanks,

Byron Hopp
 
G

Guest

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.
 
B

Byron Hopp [MCS]

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...
 
O

Otis Mukinfus

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
 
P

Paul Clement

¤ 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)
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top