<legend id='Qmkyo'><style id='Qmkyo'><dir id='Qmkyo'><q id='Qmkyo'></q></dir></style></legend>
  • <tfoot id='Qmkyo'></tfoot>

      <i id='Qmkyo'><tr id='Qmkyo'><dt id='Qmkyo'><q id='Qmkyo'><span id='Qmkyo'><b id='Qmkyo'><form id='Qmkyo'><ins id='Qmkyo'></ins><ul id='Qmkyo'></ul><sub id='Qmkyo'></sub></form><legend id='Qmkyo'></legend><bdo id='Qmkyo'><pre id='Qmkyo'><center id='Qmkyo'></center></pre></bdo></b><th id='Qmkyo'></th></span></q></dt></tr></i><div id='Qmkyo'><tfoot id='Qmkyo'></tfoot><dl id='Qmkyo'><fieldset id='Qmkyo'></fieldset></dl></div>
        • <bdo id='Qmkyo'></bdo><ul id='Qmkyo'></ul>
      1. <small id='Qmkyo'></small><noframes id='Qmkyo'>

        MS Access 调用 SQL Server 存储过程

        MS Access call SQL Server stored procedure(MS Access 调用 SQL Server 存储过程)
          <tbody id='1bOHT'></tbody>

          <i id='1bOHT'><tr id='1bOHT'><dt id='1bOHT'><q id='1bOHT'><span id='1bOHT'><b id='1bOHT'><form id='1bOHT'><ins id='1bOHT'></ins><ul id='1bOHT'></ul><sub id='1bOHT'></sub></form><legend id='1bOHT'></legend><bdo id='1bOHT'><pre id='1bOHT'><center id='1bOHT'></center></pre></bdo></b><th id='1bOHT'></th></span></q></dt></tr></i><div id='1bOHT'><tfoot id='1bOHT'></tfoot><dl id='1bOHT'><fieldset id='1bOHT'></fieldset></dl></div>

            • <bdo id='1bOHT'></bdo><ul id='1bOHT'></ul>
              <legend id='1bOHT'><style id='1bOHT'><dir id='1bOHT'><q id='1bOHT'></q></dir></style></legend>

              <small id='1bOHT'></small><noframes id='1bOHT'>

                <tfoot id='1bOHT'></tfoot>
                1. 本文介绍了MS Access 调用 SQL Server 存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个 MS Access 应用程序,其中包含链接到 SQL Server 的所有表,因此在 MS Access VBA 代码或查询中,我使用这些表非常简单,我通过名称访问它们,例如 [Customers].

                  I have an MS Access application that contains all tables linked to SQL Server, so in MS Access VBA code or query I work with those tables very simple, I access them via name, like [Customers].

                  此外,我在 SQL Server 中有一个名为 sp_CopyData 的存储过程,我需要从我的 VBA 代码中调用它.如何在不创建到 SQL Server 的新连接的情况下做到这一点(我已经在某处拥有它!?因为我可以访问表)?

                  Also I have a stored procedure in SQL Server called sp_CopyData which I need to call from my VBA code. How can I do that without creating new connection to SQL Server (I already have it somewhere!? because I have access to tables)?

                  还是不可能?感谢任何帮助.谢谢!

                  Or it's impossible? Appreciate any help. Thanks!

                  推荐答案

                  找到了正确答案,应该是这样的:

                  The right answer found out, it should be like:

                  Dim qdef As DAO.QueryDef
                  Set qdef = CurrentDb.CreateQueryDef("")
                  qdef.Connect = CurrentDb.TableDefs("[ANY LINKED TABLE TO MS SQL SERVER]").Connect
                  qdef.SQL = "EXEC sp_CopyData"
                  qdef.ReturnsRecords = False  ''avoid 3065 error
                  qdef.Execute
                  

                  这篇关于MS Access 调用 SQL Server 存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  SQL query to group by day(按天分组的 SQL 查询)
                  Include missing months in Group By query(在 Group By 查询中包含缺失的月份)
                  sql group by versus distinct(sql group by 与不同)
                  How to return a incremental group number per group in SQL(如何在SQL中返回每个组的增量组号)
                  Count number of records returned by group by(统计分组返回的记录数)
                  SQL GROUP BY CASE statement with aggregate function(带聚合函数的 SQL GROUP BY CASE 语句)

                  • <bdo id='LrBmi'></bdo><ul id='LrBmi'></ul>
                    <tfoot id='LrBmi'></tfoot>
                      <tbody id='LrBmi'></tbody>

                    <small id='LrBmi'></small><noframes id='LrBmi'>

                    <legend id='LrBmi'><style id='LrBmi'><dir id='LrBmi'><q id='LrBmi'></q></dir></style></legend>

                            <i id='LrBmi'><tr id='LrBmi'><dt id='LrBmi'><q id='LrBmi'><span id='LrBmi'><b id='LrBmi'><form id='LrBmi'><ins id='LrBmi'></ins><ul id='LrBmi'></ul><sub id='LrBmi'></sub></form><legend id='LrBmi'></legend><bdo id='LrBmi'><pre id='LrBmi'><center id='LrBmi'></center></pre></bdo></b><th id='LrBmi'></th></span></q></dt></tr></i><div id='LrBmi'><tfoot id='LrBmi'></tfoot><dl id='LrBmi'><fieldset id='LrBmi'></fieldset></dl></div>