|
-
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.
Similar Threads
-
By Probie in forum VB Classic
Replies: 3
Last Post: 01-05-2007, 03:37 PM
-
Replies: 6
Last Post: 12-11-2002, 05:08 AM
-
By Graham Russell in forum VB Classic
Replies: 1
Last Post: 09-25-2002, 08:13 AM
-
By Humberto Morales in forum .NET
Replies: 2
Last Post: 04-18-2001, 10:46 PM
-
By David Kroll in forum .NET
Replies: 33
Last Post: 02-13-2001, 10:23 PM
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks