DTS 包和 连接访问
我使用 DTS 动态创建一个访问数据库。 文件创建后(此时有效),我让 DTS 包通过 HTTP 将其发布到另一个站点。 (这个 HTTP 正是它必须完成的方式——规范的一部分。)
但是当包发布文件时,发布的版本作为 0 字节文件出现。 发布文件的代码经过测试并且实现良好。 我确信它有效。 一位同事告诉我,他认为出现这个“0 字节”错误是因为 Access 连接尚未关闭访问文件。 他说,DTS 包必须完成才能关闭访问文件。
问题是:如何让 Access 在执行发布文件的步骤之前关闭 Access 文件?
以防万一,步骤如下:
- 创建 Access 文件,为这个新文件设置预定义的访问连接对象
- 在 Access 中创建表
- 使用转换数据任务填充 Access 数据库(从 SQL Server)
- 为了 通过 HTTP 的文件(正在使用预定义/预测试的 Libaary)
预先感谢您的帮助!
Using DTS I'm dynamically creating an access database. After the file is created (which works at this point) I'm having the DTS package post it via HTTP to another site. (This HTTP is just how it has to be done -- part of the spec.)
But when the package posts the file, the posted version comes out as a 0 byte file. The code to post the file is tested and well implemented code. I'm sure it works. A colleague told me that he believes this "0-byte" error occurs because the Access connection hasn't closed the access file. He said that the DTS package must complete for the access file to be closed.
The Question is: How do I get Access to close the Access file before the step to post the file executes?
Just in case it is needed, the steps are:
- Create the Access file, set a pre-defined access connection object to this new file
- Create the Table in Access
- Use a Transform Data task to Populate the Access Database (from a SQL Server)
- Post the file via HTTP (predefined/Pretested Libaary is being used)
Thank you in advance for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我刚刚发现的答案是,在发布文件之前(或在完成写入文件之后)让工作流程关闭连接,
我可以通过选中“完成时关闭连接”复选框来完成此操作工作流属性对话框的选项选项卡。
谢谢你们!
The answer, I just found out, is that just before I post the file (or after I'm done writing to the file) have the workflow close the connection
I can accomplish this by checking the "Close Connection on completion" checkbox on the options tab of the Workflow Properties dialog.
Thank you all!
我相信您的同事是正确的,通过 HTTP 发布的内容很可能需要位于 DTS 之外,或者您可能需要研究关闭连接的 VBS 方式,但我不确定这是否可能。
I believe your colleague is correct, the posting via HTTP most likely will need to live outside of the DTS, or you might need to look into a VBS way of closing the connection, but I'm not sure if that is possible.