Reading VB Random Files with Access

E

Eoin, Dublin

Hello all,
Is it possible to get Access to link to VB random access files?
I mean the old style fixed length files

TIA
 
D

Douglas J. Steele

VBA has the same Get and Put statements as VB. If you already have code to
read them in VB, it should port to Access without any issue. (Unless, of
course, you're talking about VB.Net, not VB, in which case it may not be a
slam dunk)
 
E

Eoin, Dublin

Doug Thank you for your reply. I was hoping I could set up a "DSN" or
suchlike so I can use the query by grid feature in Access on my 1 remaining
legacy file.
Any Ideas?

T.I.A.
 
D

Douglas J. Steele

AFAIK, there's no way to use a DSN with a random access file. To be honest,
I'm not sure what options (if any) you have.
 
J

John Nurick

AFAIK, there's no way to use a DSN with a random access file. To be honest,
I'm not sure what options (if any) you have.

Absent an ODBC driver I can't think of any way of linking to the file
itself. But it shouldn't be too hard to convert the file to something
that could be linked to. Possible approaches:

* add a .dbf file header to make it look like a dBASE III file;

* insert a CRLF at the end of each record and treat it as a fixed
width text file with some unusual field contents (the binary fields in
the original file)

* convert it to a conventional text file (easily done using Perl's
unpack function or in VBA).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top