Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User Variables Question - DBNull?

Status
Not open for further replies.

Catadmin

Programmer
Oct 26, 2001
3,097
US
You know how when you open up the Variables window it gives you the option to create package or task specific variables and then gives you a list of datatypes? Well, I'm trying to figure out what DBNull means and what, if anything, it should be used for.

I have a task I've converted from DTS which maps a Result Set to a variable which happens to be of data type DBNull. The task itself is failing and I'm trying to figure out if DBNull has anything to do with it or not. Unfortunately, there isn't a lot of information on Google that gives me the answer I think I'm looking for.

Anyone know? Thanks in advance!!!


Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
Here is what I gathered

"To set values in a database to their uninitialized state, use the System.DBNull.Value structure. You can pass this value in using a T-SQL command, or a stored procedure - passing DBNull.Value as a parameter"

I hope it is not going to lost in translation.

HTH
 
So it's only for passing values into SQL Server/flat file/etc. and should not be used when you want to assign a "real" value to a package variable, correct?





Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top