10-07-2011 04:23 PM
I'm trying to execute an existing query that I've saved in MS Access, but I can't seem to find the right combination of Invoke/Property nodes to return the recordset that results from the query.
I thought this would be straight-forward, but NoJoy. Help?
10-07-2011 07:52 PM
To begin with, Access is not a database, it's an applications development environment that sits on top of a DBMS called Jet that is built into Windows. Hence, if you want to execute a query all you need to do is use ADO to talk directly to Jet. For examples look here.
Mike...
10-10-2011 10:23 AM
To begin with, I never implied Access was a database, I stated that it was the program that I'd used to define a Query.
I've discovered that Access will show the Query syntax in Design View, so I'm going to try sending the copied SQL text via ADO.
Wish me luck, I'll update with what I find.
10-10-2011 11:28 AM
Looks like this is the Big Winner.
Last glitch, how do I close Access programmatically? When I run this VI, it leaves Access open, and I'd like it to Exit when it finishes.
10-10-2011 12:21 PM
Spoke too soon, it's returning a default recordset that opens, not the query....
Strugglin' On.
10-10-2011 12:30 PM
Why are you using Access functions? You said you were going to use ADO. Since it sounds like you don't have NI's toolkit, and did not use Mike's ADO functions, try the free LabSQL.
10-10-2011 12:33 PM
The SQL function works just as well as the VI snippet I posted above; which is to say, not at all.
10-10-2011 01:03 PM
10-10-2011 07:29 PM
So what is the SQL you are trying to run. When you say it doesn't work, do you mean that it returns an error or you just don't get any data back? Can you post the *.mdb file you are trying to query as well - or at least what the table schemas are?
Mike...