0

Hi Guys, I want to ask about dat file. How can I create a code for read and write dat file with VB ?, eg :

string
string
0.5000, 40
0.7699, 60
0.8431, 70
1.6754, 50
string
string

For above example,The code read string value in line 1 and 2 then send it's value to rich text box control. After that, the code continue read next line which contain numeric value (X,Y), plot it's value to mschart type xy schatter in log format then continue again to read line which string value, send it's value to rich text box control (same with line 1 and 2). For anyone who can create the code, please help me.

Thanks


Djali

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by selvaganapathy
0

Hi,
If you read in format (String, String, Number , Number ...) ie you know exact size what you need to read and write, then use Random Access Files. That is Make a Structure for this

Ex

Type ReadData
   .......
   Text1 As String * 255
   Text2 As String * 255
   X As Single
   Y As Single
   ....
End Type

read and write using this structure.

If the string size cannot be predicted then use the Sequential Access

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.