![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am trying to add a date as a global variable and no matter what I add, I get the following error: Could not convert variable beginExecute from type BSTR to type Date When I hit the new button it sets up a default as String which I normally can change to anything else, but if I use date, it doesn't take it. I assume I need to put an initial date there. If this is the case, how would I put in, use the current date and time at time the package starts. I also need to set up another Global variable "endExecute". What would I set this to? I want to set this at the end as I am exiting the package. Thanks, Tom. |
#3
| |||
| |||
|
|
In message <10dem51lel994f9 (AT) corp (DOT) supernews.com>, Thomas Scheiderich tfs (AT) deltanet (DOT) com> writes I am trying to add a date as a global variable and no matter what I add, I get the following error: Could not convert variable beginExecute from type BSTR to type Date When I hit the new button it sets up a default as String which I normally can change to anything else, but if I use date, it doesn't take it. I assume I need to put an initial date there. If this is the case, how would I put in, use the current date and time at time the package starts. I also need to set up another Global variable "endExecute". What would I set this to? I want to set this at the end as I am exiting the package. Thanks, Tom. I'm guessing that the problems are all around the datetime format of your machine and the format being used in the string global variable. Have you tried using an unambiguous, VBScript compatible date. I favour dd mmm yyyy. |
|
If you are logging start and end of packages or tasks, then why not use the built in logging that DTS provides. The log to SQL Server options is the most structured, and easily query able after the event. You can tie this into your own custom logging as well by using the lineage variables to get the guid used to log to the built in log tables as well. -- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com PASS - the definitive, global community for SQL Server professionals http://www.sqlpass.org |
#4
| |||
| |||
|
|
"Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote in message news:s6zGQuWAO31AFwlY (AT) sqldts (DOT) com... In message <10dem51lel994f9 (AT) corp (DOT) supernews.com>, Thomas Scheiderich tfs (AT) deltanet (DOT) com> writes I am trying to add a date as a global variable and no matter what I add, I get the following error: Could not convert variable beginExecute from type BSTR to type Date When I hit the new button it sets up a default as String which I normally can change to anything else, but if I use date, it doesn't take it. I assume I need to put an initial date there. If this is the case, how would I put in, use the current date and time at time the package starts. I also need to set up another Global variable "endExecute". What would I set this to? I want to set this at the end as I am exiting the package. Thanks, Tom. I'm guessing that the problems are all around the datetime format of your machine and the format being used in the string global variable. Have you tried using an unambiguous, VBScript compatible date. I favour dd mmm yyyy. Actually, no. I am just just trying to add a global variable that is a date type and it was rejecting it. I assume it was because I was not putting anything in the Value field. If I put a value, such as 12/15/05, it works. But if I put getdate(), null or empty - it doesn't work. How do I set it up to be a null date? Thanks, Tom. |
![]() |
| Thread Tools | |
| Display Modes | |
| |