Link to home
Create AccountLog in
Avatar of shprakash

asked on

converting fixed string length in vb6 to

I got this error after i used upgrade wizard
"Fixed-length string size must fit in the buffer"
Private Type Record
        rsRecID As String * 100
        rsDate As String * 70
        rsTime As String * 5
End Type
how to convert this into ...pls it is urgent
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of shprakash


vb6 code is this..
 Private Type Record
        rsRecID As String * 2
        rsDate As String * 8
        rsTime As String * 4
        rsFiller1 As String * 42
        rsTotal As String * 14
        rsFiller2 As String * 4
       End Type
 when i use upgrade wizard it says
<VBFixedString(2),System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray,SizeConst:=2)> Public rsRecID() As Char
 I tried with your solution by importing the namespace in VB.Net 2.0 but it is not working...
please let me know it is urgent.. thanks
I don't understand.  Do you have a solution, or do you still need help?

Thanks for the solution