By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,379 Members | 1,380 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,379 IT Pros & Developers. It's quick & easy.

User initializes variable through VB in a DTS package? Is it possible?

antonopn
P: 42
Hello there!

I'm really confused about this! I have created a project (DTS in SQL SERVER 2000) which imports a txt file and runs some SQL statements. I want the user who runs it each time to initialize a variable, which is a sql variable (ex. @userdate). I 've been thinking using an Active X script inside the DTS and when the DTS is executed, a form (or something) will come up and the user will set the variable value (this is a datetime value).

Can you PLEASE HELP ME?
THANKS IN ADVANCE!
May 14 '08 #1
Share this Question
Share on Google+
1 Reply


antonopn
P: 42
Well I found a solution using activeX script.
This link really helped me a lot!
http://www.sqlservercentral.com/articles/DTS/2929/

THERE IS ANOTHER PROBLEM though!

I've created a global variable (string) with the name @P1.

After the ActiveX, a SQL Task is executed. When I try ti use this global variable I get an error.

example
Expand|Select|Wrap|Line Numbers
  1. insert into mytable (mystring) values (@P1)
"must declare the variable @P1"

Any suggestions???
May 14 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.