P
philip
If I execute that :
Dim Temp as string = "This is a text"
Dim sw As StreamWriter
Dim fullFileName as string = "c:\text.txt"
sw = New StreamWriter(fullFilename)
sw.Write(temp)
sw.Close()
the resulting file 'Text.txt' has the same length than the string 'temp'.
Idem if I Use BinayWriter.
BUT if 'temp' contains others characters than readable character, then the
result file has not the same length than the string.
So, if temp contains "ÿØÿá" (that is to say a string concanated with the 4
characters chr(255) & chr(216) & chr(255) and chr(225)), the file writen is
8 octets long, and not 4 octets like the string (twice more in the file than
in the string). Consequently, the copy of the memo field in a file to
rebuild the 'img' file is wrong and image reconstructed is not visible. In
Access with the method "open for binary", all is good.
So I think that I don't use the good method in Visual Studio 2005 to copy
this string on a file without any change.
Can someone help me and tell me the methos to do that ?
Dim Temp as string = "This is a text"
Dim sw As StreamWriter
Dim fullFileName as string = "c:\text.txt"
sw = New StreamWriter(fullFilename)
sw.Write(temp)
sw.Close()
the resulting file 'Text.txt' has the same length than the string 'temp'.
Idem if I Use BinayWriter.
BUT if 'temp' contains others characters than readable character, then the
result file has not the same length than the string.
So, if temp contains "ÿØÿá" (that is to say a string concanated with the 4
characters chr(255) & chr(216) & chr(255) and chr(225)), the file writen is
8 octets long, and not 4 octets like the string (twice more in the file than
in the string). Consequently, the copy of the memo field in a file to
rebuild the 'img' file is wrong and image reconstructed is not visible. In
Access with the method "open for binary", all is good.
So I think that I don't use the good method in Visual Studio 2005 to copy
this string on a file without any change.
Can someone help me and tell me the methos to do that ?