|
-
Jan 12th, 2010, 09:09 AM
#1
Thread Starter
Member
System.NullReferenceException
hi i am using VB.net 2003 and i am trying to get the number of rows of a dataset from form1 into form2 in order to use it for something else and i am getting the error"System.NullReferenceException occured...Additional information: object reference not set to an instance of an object"...my code is like this:
in form1:
Public x as integer= me.dataset.table.rows.count here it gives me the error
in form2:
dim frm as new form1
msgbox(frm.x)
pls help
-
Jan 12th, 2010, 09:12 AM
#2
Re: System.NullReferenceException
If you're getting a NullReferenceException then you're referring to something that's Nothing. Test each reference on that line and see which it is, then go back and see where you expected a value to be assigned.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|