
How to export an Access table to a binary file in Visual Basic
You can read all the records in an array using the GetRows method and then write the array to a binary file. Here
an example (made in Access, so you'll have to change the databasename):
Sub ConvertToBinary()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim ar
Set db = CurrentDb
Set rs = db.OpenRecordset("Table1")
With rs
.MoveLast 'To get the correct recordcount
.MoveFirst
ar = .GetRows(.RecordCount)
.Close
End With
Open "tbldump.bin" For Binary As 1
Put #1, , ar
Close 1
End Sub
Quote:
> Help!!!
> How to export an Access table to a binary file in VB5?
> Thanks.
> Phong