Error when passing null to stored procedure

Posts   
 
    
jookyone avatar
jookyone
User
Posts: 104
Joined: 25-Jan-2005
# Posted on: 09-Feb-2007 16:10:09   

I am using the v2.0 .Net 2.0 templates with Oracle 10g, and I have a stored procedure that accepts nullable values. I set the IsNullable property in the LLBLGen designer for the respective parameters to true, but I am getting an InvalidOperationException with the message "nullable object must have a value" (oxymoron, anyone?) when I pass a field whose value is null into the stored procedure wrapper function. For ex:

int returnVal = ActionSP.InsertIntoClassBullet(classBullet.EvidenceId, blah, blah, blah..);

Now, if I pass 'null' in place of the field reference, it works fine. I've also tried passing 'classBullet.EvidenceId.Value' but I get the same error.

I have checked the forums and docs and I feel like I am using the correct syntax here--what gives?

Thanks, Larkin

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 09-Feb-2007 16:26:55   

I think you are using an old version as this was solved before. http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=7926