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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.