VB6 to VB.Net " FileGet" conversion problem
I have been working on converting an old application from VB 6.0 to VB.Net. I have used the VB.Net 2005 conversion tool, but it still requires more editing on my part to have it function properly. My problem deals with taking a .dat file and inputing the data into an array TestRecord(2) using the FileGet function.
The VB 6.0 code works fine as bellow:
FileName$ = "c:\Impact-E\TestFiles\" & Text1.Text & ".dat"
Open FileName$ For Random As #3 Len = Len(TestRecord(1))
Get #3, I, TestRecord(2)
But after I used VB.Net 2005 conversion tool and rewrote the code it still does not work.
FileName = "c:\Impact-E\TestFiles\" & Text1.Text & ".dat"
FileOpen(3, FileName, OpenMode.Random, , , Len(TestRecord(1)))
FileGet(3, TestRecord(2), I) 'Error occurs on this line
The VB.Net code will open and begins to read the data, but then gives me an error #5. Saying its unable to read beyond the end of the stream.
By Probie in forum VB Classic
Last Post: 01-05-2007, 03:37 PM
Last Post: 12-11-2002, 05:08 AM
By Graham Russell in forum VB Classic
Last Post: 09-25-2002, 08:13 AM
By Humberto Morales in forum .NET
Last Post: 04-18-2001, 10:46 PM
By David Kroll in forum .NET
Last Post: 02-13-2001, 10:23 PM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center