|
-
Nov 9th, 2008, 03:01 AM
#1
Thread Starter
Junior Member
Null Reference Exception Unhandled
I am getting the above error from the following code
fileWriter.WriteLine( _
record.strFirstName & "," & record.strLastName & "," & _
record.strStudentId & "," & record.strCourseName & "," & _
record.strGrade)
I am not exactly sure why.
-
Nov 9th, 2008, 09:05 AM
#2
Re: Null Reference Exception Unhandled
There isn't enough there to be certain, but the most likely answer is that fileWriter has not been instantiated. Next most likely is that record has not been instantiated. To find out which, you can highlight any piece and press Shif+F9 to look for the item that is Nothing.
My usual boring signature: Nothing
 
-
Nov 10th, 2008, 11:40 PM
#3
Thread Starter
Junior Member
Re: Null Reference Exception Unhandled
I figured out what I was doing wrong I had to create the file for this code to work. Thanks
for all your replies.
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
|