NullReferenceException in BusinessEntity.vb

All your dOOdad needs ...

NullReferenceException in BusinessEntity.vb

Postby lytri on Wed Oct 25, 2006 7:19 pm

I am getting a System.NullReferenceException on this line:
_dataRow(columnName) = data
when I run my application with the dOOdads_2005 project.

I can only imagine that the _dataRow object is not being initialized for some reason. Any idea on how to fix this? Let me know if I need to post more info.

Here is the top of the stack trace:
System.NullReferenceException was unhandled
Message=\"Object reference not set to an instance of an object.\"
Source=\"MyGeneration.dOOdads\"
StackTrace:
at MyGeneration.dOOdads.BusinessEntity.SetInteger(String columnName, Int32 data) in C:\\Program Files\\MyGeneration\\Architectures\\dOOdads\\VB.NET\\MyGeneration.dOOdads\\BusinessEntity.vb:line 852

Thanks,
Ryan
--
Rational Anarchy
lytri
Lurker
 
Posts: 3
Joined: Thu Aug 24, 2006 8:41 pm

Postby mike.griffin on Fri Oct 27, 2006 4:01 am

Can you show us some source? Why are using using the lowlevel data row stuff? The whole point of dOOdads is that you have a better way, you probably forgot to call AddNew() but still post some more code, you might be confused on how to use dOOdads?
User avatar
mike.griffin
Site Admin
 
Posts: 3290
Joined: Sat Apr 03, 2004 6:10 am
Location: Indianapolis, IN

Postby lytri on Fri Oct 27, 2006 9:59 pm

Mike,

You sure know your product well! I would post some code, but I feel a bit dumb now that I've looked again. After walking away from it for a bit, I realized I had just left out the Where part of the dynamic query, so the code was, instead of building a query, trying to set the value of fields in a row that I had no intention of adding, i.e. I did not call AddNew() but I wasn't trying to add anything. Oops!

Thanks for the reply Mike, I am very impressed with the way you have set up d00dads to be so flexible and poweful.

Thank you,
Ryan
--
Rational Anarchy
lytri
Lurker
 
Posts: 3
Joined: Thu Aug 24, 2006 8:41 pm

Postby mike.griffin on Sun Oct 29, 2006 1:37 am

Cool, glad you like it and that you're up and running.
User avatar
mike.griffin
Site Admin
 
Posts: 3290
Joined: Sat Apr 03, 2004 6:10 am
Location: Indianapolis, IN


Return to dOOdads - MyGeneration's .NET Architecture

Who is online

Users browsing this forum: No registered users and 1 guest

cron