Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Passing Boolean Null From SqlDataProvider to Stored Procedure?Passing Boolean Null From SqlDataProvider to Stored Procedure?
Previous
 
Next
New Post
6/2/2006 6:32 PM
 

Your object can hold 3 values, but not if you update your public property. It is a boolean, so holds true or false. If you want to pass a null, you create the object and never update the property i.e. if you could check and if you wish to pass null, create the object, populate the other values, and then let it pass through to the sqldataprovider - as it's still the default Null.Nullboolean then it works.

if you use rynostats.applyenjpt = anyvaluehere , you are using the setter which accepts boolean's. The secret is to not set the value, allow the constructor to do it for you.

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
6/2/2006 6:40 PM
 
Thanks again.  I'll give that a shot.

I'm too poor for anything other than the community version
 
New Post
6/3/2006 9:45 AM
 

Alright, after getting some distance from this project for a few hours and collecting some Data here are the results:

If the GetNULL() is called on the boolean value in the SqlDataProvider

MyObject.Boolean not set = NULL in the database (GOOD)

MyObject.Boolean set to False = NULL in the database (BAD)

MyObject.Boolean set to True = True in the database (GOOD)

If the GetNULL() is not called on the boolean value in the SqlDataProvider

MyObject.Boolean not set = FALSE in the database (BAD)

MyOjbect.Boolean set to True = TRUE in the database (GOOD)

MyObject.Boolean set to False = FALSE in the database (GOOD)

So taking the case where I do use the GetNull() in the SqlDataProvider, somehow when I assign False to the Object boolean property it is getting translated via the DAL into a NULL.  I know the Object is actually assigning a False value to the property because I had it assigned to a label string to verify right after assignment.

MyObject.Boolean = False

Label1.text = MyObject.Boolean.ToString ' results in showing "False"

So using the "solution" code posted in this thread...my False assignment to an object is getting converted somewhere in the DAL into a NULL value.  I can't wait to spend another two days on this one simple and wholly unproductive issue.


I'm too poor for anything other than the community version
 
New Post
6/4/2006 12:19 AM
 
Can someone smart tell me exactly what happens when you call an Object method?  My Object creation is good and the properties hold values fine.  But when I call the method ObjectController.AddNewObject(InfoObject) that False boolean value gets converted to Null.

I am assuming it goes from the Controller to the DataProvider to the SqlDataProvider to the Stored Procedure.  Is this correct?

I'm too poor for anything other than the community version
 
New Post
6/4/2006 8:20 AM
 
bump

I'm too poor for anything other than the community version
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Passing Boolean Null From SqlDataProvider to Stored Procedure?Passing Boolean Null From SqlDataProvider to Stored Procedure?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out