使用Powershell创建Access 2007查询吗? [英] Use Powershell to create access 2007 Queries?

查看:84
本文介绍了使用Powershell创建Access 2007查询吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在关注 Richard Siddaway关于Powershell + Access2007的精彩系列.

不幸的是,它在讨论在Powershell中创建/运行/修改Access 2007查询之前结束了.该怎么办?

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

推荐答案

所引用的系列文章使用了有问题的存储过程的定义. :

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

SP是我们拥有的一段代码 定义并保存在数据库中."

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

虽然这可能是一种隐喻的方式,但对于Access/Jet/ACE却是不正确的.在Jet/ACE数据库的对象中没有通用术语过程"所指的CODE.在Access/Jet/ACE中,过程"只是存储的QueryDef,因为不允许使用过程代码.不知道OLEDB接口是否有限制,但是我的猜测是PROCEDURE表示DML查询,而VIEW表示SELECT.

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.

所以(我只是在这里猜测-我是Access开发人员,因此不需要从外部进行任何操作),如果要创建/更新DML QueryDef,则可以使用PROCEDURE关键字以及用于创建/更改程序的相关DML.同样,对于SELECTs,您将使用VIEW(我假设).

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).

这篇关于使用Powershell创建Access 2007查询吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆