0

I have been following Richard Siddaway's Awesome Series on Powershell+Access2007.

Unfortunately it ends before discussing creating/running/modifying access 2007 queries in powershell. How could this be done?

4
  • What did you have in mind? Is msmvps.com/blogs/richardsiddaway/archive/2009/11/30/… not suitable? Commented Aug 24, 2010 at 17:33
  • Yeah, I can get the update record stuff to work out fine. I am trying to figure out how to manipulate queries from powershell to an 2007 access db. Commented Aug 24, 2010 at 18:08
  • Still not clear. Do you wish to create a view (query) in MS Access? Commented Aug 24, 2010 at 19:27
  • I would like to be able to perform CRUD operations on the queries in an access database. Any query that I read from(execute) I would like to be returned to the powershell session as an object. Commented Aug 24, 2010 at 20:03

1 Answer 1

0

The cited series of articles uses a definition of stored procedure that is problematic. It says:

An SP is a piece of code that we have defined, and saved in the database".

While this may be correct in a metaphorical sort of way, it's incorrect for Access/Jet/ACE. There is no CODE in the objects in a Jet/ACE database that are referred to by the generic term "procedure. In Access/Jet/ACE, a "procedure" is just a stored QueryDef, as there is no procedural code allowed. I don't know if the OLEDB interface restricts it or not, but my guess is that PROCEDURE means DML query and VIEW means SELECT.

So (and I'm just guessing here -- I'm an Access developer so have no need for doing any of this externally), if you want to create/update a DML QueryDef, you'd use the PROCEDURE keyword and the relevant DML for creating/altering PROCEDUREs. Likewise, with SELECTs, you'd use VIEW (I'm assuming).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.