如此,基于我的表单中的字段,我想在该字段更改时执行SQL查询。

ive设置数据连接,但据我所知,连接是静态的,没有办法根据我的表单的字段操纵查询。有没有人达到过这个,或者可能有人对这个问题有聪明的解决方案?

对我来说,我无法理解为什么这个限制存在,因为整个关于我的外部数据源的整个点都必须是一个可以基于动态参数来查询它。

有帮助吗?

解决方案

Alexandar,

I would suggest you to use a separate Web Service for getting data to InfoPath.. In Web Service, use Object Model to connect database and query!

Or, if you can do VSTA Code on InfoPath form (needs administrative approval for InfoPath form, each time you publish the form).. Here is an example:
Dynamic SQL Data connection in InfoPath

EDIT
Seems possible duplicate of:
Filtering Secondary SQL data connection with value from Main data connection

其他提示

If you only want to filter your datasource, you can execute the connection for all items, after you get the result of your datasource connection, you can filter the results based on your field on your form. Hope this helps you.

许可以下: CC-BY-SA归因
scroll top