Help with duplicate values
#1

i am programming a tool, but when i try to save in a file, i have a strange error, because i only want to save a value, but in the file appear two values. first time in INT32 format and then in Byte format.

 

Here is some screens:

 

Original file

 

2

 

and when i save in file

 

2

 

1E 00 00 00 is the length of the next phrase and i dont know why in save file appears duplicate first byte of length.

 

if you need some more information, you only have to ask me for it

 

i hope you can help me

 

thanks in advance

#2

i have found my problem, but atm i dont know how to solve it.

 

the problem is :

 

Dim aux as String

 

dr.write(String)

 

when i save a string with this setence in a file, before the string save automatically lenght of string.

 

how could i do to save it without length or save the length that is save automatically in INT32 format instead of Byte format?

#3

#solved

 

i have got bytes and then convert to string by encoding.utf8 to load file

 

and to save the same but from the end to the begining. get bytes from string and then encoding.utf8 to save file



Forum Jump:


Users browsing this thread: 1 Guest(s)