我已经在SQL查询分析器中尝试了两种语法,并且在使用 语法时遇到了麻烦。任何人都可以发送两种方式的代码。谢谢。 美好的一天, Brett 解决方案 不清楚你为什么要这样做...你在做什么?你不能通过正常触发器做的DTS?这将有所帮助,如果你可以 解释更多..... 不确定你是否可以通过触发器运行包..可以设置一个工作 并调用一份工作......我也好奇.... 我试过将SQL数据库连接到带有T-SQL的VFP表和 没有运气。我已经尝试了几个星期通过远程服务器链接两个 或T-SQL并直接使用触发器。到目前为止,这是我能够开始工作的原因。如果您有其他想法或任何帮助 将不胜感激。 Brett 你应该能够在你的触发器中使用sp_oacreate启动DTSRUN。 你试过这个吗? 有一个叫DTS的工作是另一个选项,然后使用msdb..sp_start_job或类似的东西在触发器中启动作业 。 我已经完成了这两个。 I have created a functioning DTS package inside Enterprise Manager andnow I want to be able to execute it outside of EM. The package importsdata from an SQL dbase to a Visual FoxPro dbase. I would like this DTSpackage to execute everytime an Insert(of certain critera) is made onthe SQL dbase. I am thinking that using an Insert Trigger on the SQLtable is the way to go about this. I am seeking advice as to... is thisthe best way to go about this.Also, and if so, in a trigger which route is the best to take...1. use dtsrun command line utility or2. setup a COM object to run the DTS packageI have tried both in SQL query analyzer and am having troubles with thesyntax. Could anyone possibly send the code for both ways. Thanks.Good Day to all,Brett 解决方案 Its not clear why you would want to do this... What are you doing inthe DTS that you cant do thru normal trigger? It would help if you canexplain more.....Not sure if you can run the package thru trigger.. May be set up a joband invoke a job... I am also curious.... I have tried linking SQL database to the VFP tables with T-SQL and havehad no luck. I have tried for weeks to link the two via Remote Serversor T-SQL and working with directly in triggers. So far this is what Ihave been able to get to work. If you have other ideas or any helpwould be appreciated.Brett You should be able to fire up DTSRUN using sp_oacreate in your trigger.Have you tried this?Having a job that calls the DTS is another option, then start the jobin your trigger with msdb..sp_start_job or something like that.I have done both of these. 这篇关于执行DTS包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-21 03:40