How do I save raw data 
Author Message
 How do I save raw data

Use the Put command to save data in binary format and the Get command to
read them out.
ex.:

Private Sub Form_Load()
Dim x(50) As Integer
Dim y(50) As Integer

For i = 0 To 49
 x(i) = i
Next i

'write
Open "file.dat" For Binary As #1
Put #1, , x
Close #1

'read
Open "file.dat" For Binary As #1
Get #1, , y
Close #1

For i = 0 To 49
 MsgBox y(i)
Next i

End Sub



Fri, 09 Aug 2002 03:00:00 GMT  
 How do I save raw data
How do I save data to disk. I want to save the variables and arrays in
a program but not as a text file.

Ian

Sent via Deja.com http://www.deja.com/
Before you buy.



Sat, 10 Aug 2002 03:00:00 GMT  
 How do I save raw data
Thanks. I thought it was but the documentation is really vague and the
example even worse. I will have to get a good reference book. Any
suggestions. Ive just moved from standard basic to vb.

Ian

Sent via Deja.com http://www.deja.com/
Before you buy.



Sat, 10 Aug 2002 03:00:00 GMT  
 How do I save raw data


Quote:
> Thanks. I thought it was but the documentation is really vague and the
> example even worse. I will have to get a good reference book. Any
> suggestions. Ive just moved from standard basic to vb.

> Ian

> Sent via Deja.com http://www.deja.com/
> Before you buy.

Do it this way ..
As far as books go I have accosted several newbies at Borders recently
thrusting into their greasy palms, copies of Balena's Programming Visual
Basic 6
Neila

Private Sub Form_Load()
Dim X() As Long
Dim Y() As Long
ReDim X(50)
Dim I As Long
For I = 0 To 50
X(I) = I
Next

Dim lngSize As Long

Dim FF As Integer
FF = FreeFile
Open FF For Binary As #FF
lngSize = UBound(X)
Put #FF, , lngSize
Put #FF, , X
Close FF
FF = FreeFile

Open FF For Binary As #FF
Get #FF, , lngSize
ReDim Y(lngSize)
Get #FF, , Y
Close FF
For I = 0 To 50
Debug.Print Y(I)
Next
End Sub



Sun, 11 Aug 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. saving drawn pictures as raw data?

2. How to determine OLE object name and how to save raw OLE data

3. Append raw data to Access table

4. Printing Raw Data - Please help

5. Trncating Data to update in Raw Field in oracle from VB.net

6. Spooling raw printer data

7. Problem with long raw data

8. ORACLE RAW LONG data type

9. How do I open a table named SPINDLE RAW DATA usiing ADO

10. Raw data to Printer device.

11. Raw data -->file wave

12. How to send Raw data to the printer

 

 
Powered by phpBB® Forum Software