By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,536 Members | 2,165 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,536 IT Pros & Developers. It's quick & easy.

How can I write C# code that can pick up the custom events that occur in it's Access server?

P: n/a
I needed to import large CSV files into Access, when requested by a
command in a .Net interface.

Because Access does not have a bulk insert command, and I already have
vba macros in Access that do the import, I simply called the vba macro
from .Net using COM.

Each time a csv file is successfully imported, I would like to raise a
custom event in Access that the .Net interface can handle.

The situation is complicated, by the Access database that the csv files
are imported to is a copy of a stadard template Access file, this
cahnges the GUID Id of the Access server everytime the program runs.

How can I write C# code that can pick up the custom events that occur
in it's Access server?

Thanks in advance if anyone can help.

May 30 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Why not just use the Primary Interop Assemblies for Office, and then
hook up to the events that it exposes?

Also, you really shouldn't need to use access to do this (or the macros,
for that matter).

You should just use the Data Transformation Services to do what you
wish. It will transform data from one format to another (including CSV to
MDB) out of the box.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<ke*******@yahoo.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
I needed to import large CSV files into Access, when requested by a
command in a .Net interface.

Because Access does not have a bulk insert command, and I already have
vba macros in Access that do the import, I simply called the vba macro
from .Net using COM.

Each time a csv file is successfully imported, I would like to raise a
custom event in Access that the .Net interface can handle.

The situation is complicated, by the Access database that the csv files
are imported to is a copy of a stadard template Access file, this
cahnges the GUID Id of the Access server everytime the program runs.

How can I write C# code that can pick up the custom events that occur
in it's Access server?

Thanks in advance if anyone can help.

May 30 '06 #2

P: n/a
Have you copy and paste your macro code into VB.NET using VS 2005 or VS 2003
and see you can compile? Assuming that you might need to change a bit of
your VBA code.

Post your code here will be nice.

I am yet to confrim whether DTS come without SQL Server.

When you said "Access Server" is not that appropiate. Microsoft only has a
database Server, MS SQL Server.

chanmm

<ke*******@yahoo.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
I needed to import large CSV files into Access, when requested by a
command in a .Net interface.

Because Access does not have a bulk insert command, and I already have
vba macros in Access that do the import, I simply called the vba macro
from .Net using COM.

Each time a csv file is successfully imported, I would like to raise a
custom event in Access that the .Net interface can handle.

The situation is complicated, by the Access database that the csv files
are imported to is a copy of a stadard template Access file, this
cahnges the GUID Id of the Access server everytime the program runs.

How can I write C# code that can pick up the custom events that occur
in it's Access server?

Thanks in advance if anyone can help.

May 30 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.