动态查询 [英] dynamic queries

查看:57
本文介绍了动态查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个包含我的数据集中所有变量的表单,我可以在其中为一个表中的任意数量的变量选择某个值或某些值的范围,并根据我放置的值在表单中,它将生成一个查询。


例如,让我们说我的表有四个变量

面额金额年龄预期政策贷款


在表格中我想说明......让我们说.....


面额100,000-1000000

年龄70-85

人寿保险60-100

保单贷款(无)我想把它留空,因此没有标准被选中

I would like to create a form that includes all the variables in my dataset, in which I can select a certain value, or a range of certain values for any amount of variables in one of tables and based on the values I put in the form, it will generate a query.

For example, Lets say my table had four variables
Face Amount AGE Life Expectency Policy Loan


In the form I would like to specify.....lets say.....

Face Amount 100,000-1000000
AGE 70-85
Life Expectency 60-100
Policy Loan (nothing) I want to just leave it blank and thus no criteria will be selected

推荐答案

好的,你有什么问题?



好的,你有什么问题吗?
Okay, so what problems are you having?



我甚至不知道从哪里开始。我这样做吗?

I am not even sure where to begin. HOw do I do it?


有两条路线。一种是在想要查看查询时从代码重建查询定义。另一种方法是使用表单的控件作为查询中的条件。这还需要代码以确保输入的条件在查询中有效。
There are two routes. One is to rebuild the query definition from code when they want to view the query. Another is to use the form''s controls as criteria in the query. This will also require code to make sure the criteria entered is valid in a query.


这篇关于动态查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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