【发布时间】:2011-08-23 16:20:44
【问题描述】:
我有一些可以修改的旧 VB 脚本代码,但我无法将应用程序迁移到新语言...
这个 VB 脚本主要用于连接到 SQL 2000 Server 并在运行它之前操作包的连接,这将在本地输出一个平面文件数据库。
现在我没有 DTS 包,我只有一个 SSIS 包。
以前的代码是这样的:
dim DTScon
dim DTSpkg
set DTSpkg = Server.CreateObject("DTS.Package")
DTSpkg.LoadFromSQLServer "mysqlserver","myuser","mypass",dts.DTSSQLStgFlag_Default,,,,"MyPackageName"
set DTScon = DTSpkg.Connections.Item("Conn1")
set DTScon.UserId = "conn_username"
set DTScon.Password = "conn_password"
set DTScnp = DTScon.ConnectionProperties.Item("Data Source");
DTScnp.Value = "c:\path\to\output\flatfile"
我现在正在尝试将代码修改为
dim DTScon
dim DTSpkg
set DTSpkg = Server.CreateObject("DTS.Application")
DTSpkg.LoadFromSQLServer "mysqlserver","myuser","mypass",dts.DTSSQLStgFlag_Default,,,,"MyPackageName"
set DTScon = DTSpkg.Connections.Item("Conn1")
set DTScon.UserId = "conn_username"
set DTScon.Password = "conn_password"
set DTScnp = DTScon.ConnectionProperties.Item("Data Source");
DTScnp.Value = "c:\path\to\output\flatfile"
我得到的第一个错误是: Microsoft VBScript 运行时错误“800a01b6” 对象不支持此属性或母亲:'DTSpkg.LoadFromSQLServer' /main.asp.241
我猜这将是我可能必须克服的众多障碍之一。 但是,我一直在努力通过 Google 搜索找到解决方案。
有没有人知道我需要做什么才能让 IIS 运行这个新代码? 或者我在尝试这样做时可能会遇到什么问题?
【问题讨论】:
标签: sql-server sql-server-2005 ssis sql-server-2000