Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting error from help file code
Message
 
To
03/07/2006 19:06:37
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01133503
Message ID:
01134030
Views:
19
Tony,

>the 'cmd' is underlined and I get this error:
>
>Warning 1 Variable 'cmd' is passed by reference before it has been assigned a value. A null reference exception could result at runtime. E:\VS 2005 Projects\Purchasing\MM_Purchase 2.1\Purchase Bussiness Objects\Pur_item.vb 134 40 Purchase Bussiness Objects
>
>I think I should be initializing these to something, but I don't know what.
>Can anyone tell me what I should be doing to get rid of these error messages?

Try this line of code instead:
Dim cmd As IDbCommand = Nothing
Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform