Stored Procedure:
CREATE PROCEDURE spSampleData AS exec master..xp_cmdshell 'dtsrun /SZEUS\sqlServer113 /NdtsPackage /UuserID /Ppassword'
GO
VB to run DTS:
Dim myCommand As SqlCommand
myCommand.CommandType = CommandType.StoredProcedure
myCommand.CommandText = "spSampleData"
myCommand.ExecuteNonQuery()
I'm not sure what I am doing wrong but any help would be great.
Thanks!Your code seems ok on the face of it. What is the error message that is generated? Or does just nothing happen?
These links might be helpful:
DTS Cookbook for .Net
Execute a package from T-SQL This one describes your current method but offers another alternative too.|||Thank you so much for the links - I'll check them out. So here are the errors...
When running in Query Analyzer:
-"DTSRun: Cannot create COM Server to load and execute DTS Package. Error -2147024769 (8007007F): The specified procedure could not be found. "
I thought this was because some of the DLLs weren't registered but that isn't it.
-"I tried to schedule it as a job, before I got this just to see, and it gave me a a long hex dec error that was in a windows alert box, so I didn't even worry with that. But it was:"
The procedure entry point ?SQLUIUpdateRegistryFromResource could not be located in the dynamic link library SQLRESLD.dll
In the Webform, it was your typical:
"Object reference not set to an instance of an object" error... So I'm at a loss.|||I hate those sorts of problems. I Googled the error message and ended up with this link.
No comments:
Post a Comment