G
Guest
hai,
At present I'm facing a strange problem. We are converting a project from
VB to .NET
One record contains Chr(0). Let the record be of length 1800. In the 50th
byte of a record a chr(0) is there.
While I use VB to read it's giving all 1800 bytes. But when I converted my
VB to VB.NET, after the 49th byte all the bytes are truncating. I have to
solve this issue to proceed further. I hope the experts around here can solve
my problem.
I'm using the random file and using a structure of length 1800 bytes.
Following is the code I use
Public Structure StudentRCDetails
<VBFixedString(1800)> Dim lsData As String
End Structure
Dim lStructDetails As StudentRCDetails
FileOpen(liKeyFileNum, lsFilePath, OpenMode.Binary, , OpenShare.Shared, 1800)
FileGet(liKeyFileNum, lStructDetails , Integer.Parse(lsStudentID))
FileClose(liKeyFileNum)
I'm getting only a part of a string. ie. till the Chr(0). After, all the
datas are discarded.
I tried with opening in Random mode also. The result is same for both the
cases.
Please help me in this issue. It's urgent
regards,
Venkatarajan
At present I'm facing a strange problem. We are converting a project from
VB to .NET
One record contains Chr(0). Let the record be of length 1800. In the 50th
byte of a record a chr(0) is there.
While I use VB to read it's giving all 1800 bytes. But when I converted my
VB to VB.NET, after the 49th byte all the bytes are truncating. I have to
solve this issue to proceed further. I hope the experts around here can solve
my problem.
I'm using the random file and using a structure of length 1800 bytes.
Following is the code I use
Public Structure StudentRCDetails
<VBFixedString(1800)> Dim lsData As String
End Structure
Dim lStructDetails As StudentRCDetails
FileOpen(liKeyFileNum, lsFilePath, OpenMode.Binary, , OpenShare.Shared, 1800)
FileGet(liKeyFileNum, lStructDetails , Integer.Parse(lsStudentID))
FileClose(liKeyFileNum)
I'm getting only a part of a string. ie. till the Chr(0). After, all the
datas are discarded.
I tried with opening in Random mode also. The result is same for both the
cases.
Please help me in this issue. It's urgent
regards,
Venkatarajan