Problem using the ODBC text driver

Problem using the ODBC text driver

Post by Radu » Tue, 21 Jun 2005 23:11:23

Hi. I have the following problem - I am using the ODBC driver to open
in Access a recordset based on a text file, using

Set objRecordset = objDB.OpenRecordset(m_strImportTxtFileName, ,

The requirement is for the text file NOT to have a txt or csv
extension, for "security reasons" - the customer should not be able to
easily open the file. Anyway, we have decided on a "DIS" extension.

The interesting part is this - on my development machine, I can open
the file just fine with the above mentioned line. On the clients'
machines, however, the following error pops up:

"Can't update. Database or object is read-only.3027"

Funny - this happens on the line with "OpenRecordset" - I don't ever
attempt to update anything with respect to this recordset !

I have *NOT* defined any DSN on my development machine, however. Why is
this happening ? If the ODBC driver cannot accept any other extension
than TXT or CSV, why does it work on the development machines ???

Thank you for your time.


Problem using the ODBC text driver

Post by Richard Co » Wed, 22 Jun 2005 05:35:44


If the file being opened is in a read only directory then you will need to
open the file exclusively, otherwise Access tried to create a lock file in
the directory containing your text file, which then fails with the above

Is this the case?

XXXX@XXXXX.COM (ROT13 to e-mail me directly). See for most things to do with caravanning.
Top 20 Replies by Programmers When Their Programs Don't Work: 6. "Did
you check for a virus on your system?"


Problem using the ODBC text driver

Post by Radu » Wed, 22 Jun 2005 23:26:48

No, Richard, unfortunately the folder is read-write. This is not it...
I assume there's something with the ODBC driver....