vb.net addin for Access

lution

Registered User.
Local time
Today, 02:09
Joined
Mar 21, 2007
Messages
114
I need to retrieve data from a web service. The only way I've found of getting at the service (and its data) is via a .NET add-in for Access. Within the add-in, I've followed the instructions from http://msdn.microsoft.com/en-us/library/aa902693.aspx to tie the add-in to a form in my Access database to do a prototype. Now I'm to the point where I want to push the data retrieved into the database.

Within the add-in there are 2 main subs, one to connect to the service and another to iterate through the records to get all the data.

My problem is I'm lost. If I could do the connection & iteration from VBA I'd know how to get the data into the database but I'm getting lost trying to figure out how to get the data in.

Is there something equivalent to Currentdb() in dao/ado/? I can use in .NET? The database is already open since the VB was launched from a command button in an Access form. Pull the data to a hidden list box on the Access form then push it in from there? I'm using Dev Studio 2008 with Access 2007 if that matters.

Any suggestions/comments would be appreciated.

-Lution
 
This is hard to answer because I don't know anything about the add-in and what it exposes. Also, it sounds like you are talking about coding in VBA but the question seems to be more about manipulating the data in the .NET environment?

It would help a lot if you went in a bit more of details and share a snippet of code where you are stuck on.
 
Thanks for the reply Banana. What I was trying to say, is that it seemed weird to me that I'd need to create a ADO/DAO connection to get to the database before I could start adding records if I did that part in the vb.NET add-in.

After looking at the sample at the URL it hit me that if I want to use the web service in VBA where I can use CurrentDB(), then I need to modify my vb.NET add-in to create wrappers for all the classes and methods I want to use from VBA.

I've been using VBA for 3 years on this project and I wanted to stick to VBA as much as I could. So after spending another day (ok, so I went to see Avatar & Sherlock Holmes) it hit me what the sample was showing me I could do and I've modified the vb.NET program to give me a wrapper and then I added a reference to the .tlb file in VBA so I could do my database interaction there.


-Lution
 

Users who are viewing this thread

Back
Top Bottom