TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ahmed fahd
NA
58
46.3k
object reference not set to an instance of an object error
Jan 15 2013 7:21 AM
the datatable in this code give me error of
object reference not set to an instance of an object
Dim dt As DataTable = New DataTable
dt = DataGridView1.DataSource
For a = 0 To DataGridView1.Rows.Count - 1 Step 1
If a = DataGridView1.Rows.Count - 1 Then
GoTo v
End If
'myobjects._emp_num = DataGridView1.Rows(a).Cells(0).Value
myobjects._emp_num = dt.Rows(a)("emp_id")
myobjects._emp_name = dt.Rows(a)("emp_name")
myobjects._emp_situation = dt.Rows(a)(3)
myobjects._day_date = dt.Rows(a)(2)
com.add_al7door(myobjects)
Next
v:
Reply
Answers (
2
)
how to determine a button selected
Click event