There isn't a decent way of doing this. Null is really a DB type option. The
DTS variables, as variants can accept Nothing or Null, but then these are
treated a Empty and Null types when viewing the properties dialog. Nether
can be manually set. Chances are that if you use this then when reading them
they will produce and error due to the unexpected nature.
For example if I use my variable in a SQL query -
SELECT * FROM sysobjects WHERE crdate = ?
A date value works fine, set like this -
DTSGlobalVariables("aa").Value = CDate("2003-01-01")
If I change the value to Null
DTSGlobalVariables("aa").Value = Null
....then the SQL task errors.
--
Darren Green
http://www.sqldts.com
"mndr" <anonymous (AT) discussions (DOT) microsoft.com> wrote
Quote:
Please, could anyone tell me how to pass NULL to the global variable of
data type Date?
I need to start my DTS package from EM, but when i enter NULL into the
window with global variable i receive error message "Could not convert
|
variable startDate from type BSTR to type Date."
Quote:
What should i put there? Empty string does not work either,
Please help!!
mndr |