07-14-2009 01:46 AM
Hello,
I am trying from Labview to create a link to an external table in an MS Access database. The code example hereafter should illustrate my goal:
My problem is apparently when I want to append the newly created link: passing a reference to the TableDef 'Append' method doesn't work.
Does someone know how to work around this -- is there any way to convert properly the tabledef item?
Thanks in advance for any feedback.
Andre
07-16-2009 07:32 AM
Hi dederocks,
to connect to a MS Access Database you have two possibilities:
- work hours and hours to do everything on your own with ActiveX like you try at the moment, but I think you need a deep knowledge on how to program ActiveX Properties and Invokes from the MS Access Database. It's very difficult and perhaps you ran from one issue into another.
- puchase or organize the LabVIEW Database Connectivity Toolkit:
http://www.ni.com/pdf/products/us/6774_database_connectivity_toolkit.pdf
with this Toolkit you get a API to easy connect to almost any database. Also there are a couple of examples integrated to the toolkit, which help you.
If I where you, I would check the link and check if you have already the DBC-Toolkit in your company, if not I would call your NI Representative.
Best regards
Alex Rudolph
Support
NI Switzerland
07-16-2009 07:49 AM
Hello Alex,
Thanks for the feedback. Actualy, I considered purchasing the Database conectivity toolkit, but as far as I could read in the NI documentation, it is NOT able to do what I was asking for -- namely, create in an Access DB a link to an external table in another DB. Or am I wrong?
Best Regards,
André Lehmann
07-16-2009 07:57 AM
Hi,
this was not clear at all from your first entry. I will check this out and answer as soon as I have a response from our Headquarter in Austin.
Best regards
Alexander Rudolph
07-17-2009 01:15 AM
Hi Raffael,
the feature you would like to have is not implemented in the DBC Toolkit, you can manipulate anything but data in a database (i.e. create tables, add data, retrieve data). DBC can also get and set database "properties" but I don't believe that creating a link to another database can be considered a property -- it's more like an action.
This means you`re on the right way, when you use the Microsoft Access Invoke Nodes. Because I don`t have a Access License here, it becomes difficult for me now. The first step in your code I would do, is to implement proper Error Handling and check if you get some error codes. As long as you say it is not working at all, we can`t focus on anything.
Best regards
Alex