By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,145 Members | 1,443 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,145 IT Pros & Developers. It's quick & easy.

Access Transfer Text Weird Problem

P: n/a
I have just discovered a really weird problem with the TransferText
method in Access 97. I was happily using this function to export a
table to file then I suddenly got this error message:

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

I was attempting to export to the following file path:
C:\Documents and Settings\leekp\My Documents\GFI\VB\CashRecon.txt

After some donkey work I found out this error only occurred when:
1) The full path + filename is more than 64 characters long (note the
above is 65)
AND
2) There are spaces in the directory name
AND
3) There is already an existing file of the same name in that
directory. i.e. the export worked first time around but not after.

So WHY is this????

This is not entirely practical as it is in an application where users
specify their own export path. The only way around this I can think of
is to rename/delete the existing file then do the export.

If anybody has any ideas I would be most appreciative!

Apr 27 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

<ka*********@hsbcam.com> wrote in message
news:11**********************@t31g2000cwb.googlegr oups.com...
I have just discovered a really weird problem with the TransferText
method in Access 97. I was happily using this function to export a
table to file then I suddenly got this error message:

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

I was attempting to export to the following file path:
C:\Documents and Settings\leekp\My Documents\GFI\VB\CashRecon.txt

After some donkey work I found out this error only occurred when:
1) The full path + filename is more than 64 characters long (note the
above is 65)
AND
2) There are spaces in the directory name
AND
3) There is already an existing file of the same name in that
directory. i.e. the export worked first time around but not after.

So WHY is this????

This is not entirely practical as it is in an application where users
specify their own export path. The only way around this I can think of
is to rename/delete the existing file then do the export.

If anybody has any ideas I would be most appreciative!


Firstly I would say that there is nothing wrong with testing for the
existence of the specified path, prompting if necessary and deleting before
you proceed. This gives you more flexibility and direct control rather than
simply on relying on the default behaviour of overwriting the file.

I don't have Acc 97 here to test, and with Acc XP I cannot replicate the
exact error, although I do get the exact same error message if I use a
non-standard file extension (e.g. Path=C:\MyExport.xyz). I believe this is
due to security patches applied to limit what file extensions can be used.
Apr 27 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.