挑战:SQL STMT用于检索已保存查询的内容(SQL) [英] Challenge: SQL STMT for Retrieving Content(SQL) of Saved Queries

查看:61
本文介绍了挑战:SQL STMT用于检索已保存查询的内容(SQL)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我理解通过Msysobjects系统表列出给定Access

数据库的所有已保存查询很容易。但是,我还没有看到任何

发布在这个NG或其他类似的内容中,这些查询还包括SQL

语句(内容),尽管我注意到了一些VB代码

。那是因为从SQL stmt获取查询

内容(不是查询结果集)根本不可能吗?


I understand it''s easy to list all saved queries of a given Access
database via Msysobjects system table. However, I have not seen any
posting over this NG or other similar ones that also include SQL
statement(content) of these queries, though I''ve noticed some VB code
for that. Is that because it''s simply impossible to get a query
content (not query resultset) from a SQL stmt?

Thanks in advance.

推荐答案

呵呵?你想要输出的SQL查询和它产生的记录集

描述了吗?

在哪里?你可以循环遍历querydefs集合并打印

querydef的SQL


dim qdf as dao.querydef''redundant,cuz ado doesn''我有一个querydef

对象

为dbengine(0)中的每个qdf(0).querydefs

debug.print qdf.name

debug.print qdf.SQL

debug.print''空白行

next qdf

huh? You want the SQL query typed out and the resulting recordset it
describes?
Where to? You can loop through the querydefs collection and print the
querydef''s SQL

dim qdf as dao.querydef ''redundant, cuz ado doesn''t have a querydef
object
for each qdf in dbengine(0)(0).querydefs
debug.print qdf.name
debug.print qdf.SQL
debug.print ''blank line
next qdf


非常好,我很感激。现在,这里有两件事。

(A)给定的Access数据库有大量的查询,超过200,所以,

调试用完它的默认容量,它没有还没完成B

;

(B)那么,与文件系统接口是否可行,即写入

每个查询到一个文件(查询名称为文件名,查询内容为

文件内容等等)?


干得好,又来了谢谢。

Very good and I appreciate it. Now, two things here.
(A) The given Access database has tons of queries, over 200, so, the
debugging runs out of its default capacity, it hasn''t finished even B
yet;
(B) So, is it feasible to interface with File System, that is, write
each query to a single file (query name as file name, query content as
file content and so on and so forth)?

Good job, again thanks.


看看Arvin Meyer的内容 http://www.datastrat.com/Code/DocDatabase.txt


将转储不仅是查询,还有表单,报告,模块和

宏,每个宏都放在自己的文件中。


-

微软Access MVP的Doug Steele
http://I.Am/DougSteele

(没有电子邮件,请!)


" NickName" <哒**** @ rock.com>在消息中写道

news:11 ********************* @ g47g2000cwa.googlegro ups.com ...
Take a look at what Arvin Meyer has at
http://www.datastrat.com/Code/DocDatabase.txt

That will dump not only the queries but the forms, reports, modules and
macros, each into its own file.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"NickName" <da****@rock.com> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...
非常好,我很感激。现在,这里有两件事。
(A)给定的Access数据库有大量的查询,超过200,所以,
调试用完它的默认容量,它甚至没有完成B (B)那么,与文件系统接口是否可行,即将每个查询写入单个文件(查询名称为文件名,查询内容为
文件内容等等)?

干得好,再次谢谢。
Very good and I appreciate it. Now, two things here.
(A) The given Access database has tons of queries, over 200, so, the
debugging runs out of its default capacity, it hasn''t finished even B
yet;
(B) So, is it feasible to interface with File System, that is, write
each query to a single file (query name as file name, query content as
file content and so on and so forth)?

Good job, again thanks.



这篇关于挑战:SQL STMT用于检索已保存查询的内容(SQL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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