将存储过程作为记录源传递给访问报告 [英] Passing stored procedure as record source to access report

查看:65
本文介绍了将存储过程作为记录源传递给访问报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直使用access作为前端,SQL作为Back end。我需要帮助生成访问报告,使用带有输入参数的存储过程

作为记录源。

我尝试了以下代码,但收到错误。可以'我使用记录集作为报告的记录源。

I have been using access as front end and SQL as Back end. I need help in generating an access report, by using a stored procedure with input parameters
as record source.
I tried the following code, but getting an error.Can''t I use recordset as record source for the report.

展开 | 选择 | Wrap | 行号

推荐答案

GetProc似乎没有定义。
GetProc doesn''t seem to be defined.


我从来没有尝试过基于记录集设置记录源....虽然我有很多经验,但这是漫长的一天。在每个应用程序中,我不从MS Access使用SQL服务器有很多经验。在我看来,你需要一个来自SQL服务器的不同视图或SQl语句然后你应该没问题

表单
I have never tried to set a recordsource based on a recordset.... It has been a long day and although I have a lot of experience in each app I don''t have a lot of experience utilizing SQL server from MS Access. It would seem to me that you need a difinitive view or SQl statement from SQL server then you should be O.K.

Forms

Access中的表单和报表从绑定到RecordSource属性的查询或SELECT语句派生数据。在客户端/服务器环境中,RecordSource属性基于基于服务器的视图或存储过程,该存储过程应返回与原始Access查询相同的数据。转换记录源时,适用与查询相同的规则(请参阅本章前面的迁移访问查询)。
Forms and Reports in Access derive their data from queries or SELECT statements bound to the RecordSource property. In the client/server environment, the RecordSource property is based on a server-based view or on a stored procedure that is expected to return the same data as the original Access query. When you convert the record source, the same rules apply as for queries (see "Migrating Access Queries" earlier in this chapter).

http://www.microsoft.com/technet/pro....mspx?mfr=true



我一直使用access作为前端,SQL作为Back end。我需要帮助生成访问报告,使用带有输入参数的存储过程

作为记录源。

我尝试了以下代码,但收到错误。可以'我使用记录集作为报告的记录源。

I have been using access as front end and SQL as Back end. I need help in generating an access report, by using a stored procedure with input parameters
as record source.
I tried the following code, but getting an error.Can''t I use recordset as record source for the report.

展开 | 选择 | Wrap | 行号


这篇关于将存储过程作为记录源传递给访问报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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