Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

transfertext error "cannot update" database or object is read-only"

139 views
Skip to first unread message

PW

unread,
Jun 18, 2019, 11:31:17 PM6/18/19
to
Hi,

Any ideas why I am getting that error? I have tried different drives
and folders. And with the .csv extension (but won't the file get
created with it anyway?).

DoCmd.TransferText acExportDelim, ,"tblRoomsAvailable",
"c:\GCalRoomAvailability"

The from file is part of the Access code database (not linked)

Is there an alternative to create a .csv file? I wonder why that
isn't working.

-paulw

Ron Paii

unread,
Jun 19, 2019, 8:02:36 AM6/19/19
to
Have you tried the exporting the table manually from the Access UI?

PS: what file is part of the access code database? Not the export file.

PW

unread,
Jun 19, 2019, 11:53:42 AM6/19/19
to
On Wed, 19 Jun 2019 05:02:32 -0700 (PDT), Ron Paii
<ron8...@gmail.com> wrote:

>On Tuesday, June 18, 2019 at 10:31:17 PM UTC-5, PW wrote:
>> Hi,
>>
>> Any ideas why I am getting that error? I have tried different drives
>> and folders. And with the .csv extension (but won't the file get
>> created with it anyway?).
>>
>> DoCmd.TransferText acExportDelim, ,"tblRoomsAvailable",
>> "c:\GCalRoomAvailability"
>>
>> The from file is part of the Access code database (not linked)
>>
>> Is there an alternative to create a .csv file? I wonder why that
>> isn't working.
>>
>> -paulw
>

*---


>Have you tried the exporting the table manually from the Access UI?
>


Yes Ron. Same error. This (DoCmd.TransferText acExportDelim, ,
"tblRoomsAvailable", "C:\GCalRoomAvailability.CSV") gives me" runtime
error 3011: The Microsoft Access database engine could not find the
object "GCALRoomAvailability#csv...".

Without the extension I get the read-only error.

>PS: what file is part of the access code database? Not the export file.


Not sure what you mean. The file to export from is in the split code
part not the data.accdb and has data in it.

Another form that uses the same command and syntax but with an .ics
extension ( DoCmd.TransferText acExportDelim, , "tblqbftemp",
"c:\Lodge-ical\names.ics", -1) generates the same error now but has
worked for many years.

-paulw

PW

unread,
Jun 19, 2019, 11:57:10 AM6/19/19
to
On Wed, 19 Jun 2019 05:02:32 -0700 (PDT), Ron Paii
<ron8...@gmail.com> wrote:

*--

Sorry - the read-only error

PW

unread,
Jun 19, 2019, 12:25:32 PM6/19/19
to
On Wed, 19 Jun 2019 05:02:32 -0700 (PDT), Ron Paii
<ron8...@gmail.com> wrote:

*--

It was a combination of things Ron!!

Something was wrong with the database(s). Even though I did a compact
and repair on both the code and data, and also recompiled the code, it
did not help.

So, I copied everything I need into another Access database and
changed the transferdatabase file export path to a subfolder of the
c:\ drive (same errors if I just went to c:\) I now no longer receive
any errors and I have a valid .csv file!!

So this works!

DoCmd.TransferText acExportDelim, , "tblRoomsAvailable",
"C:\lodge-ical\GCalRoomAvailability.csv"

Now I need to see if Google Calendar will accept it. I am planning on
having to make some changes to the file and do some troubleshooting.

Thanks again!

One more for the memory bank.

-paulw

PW

unread,
Jun 19, 2019, 1:40:22 PM6/19/19
to
*---

I successfully imported it into a Google Calendar! YeeHaw!

Now what's next? :-)

-paulw

Ron Paii

unread,
Jun 19, 2019, 4:28:21 PM6/19/19
to
Glad you got it working.

Was this a Windows 10 box?
I have see issues with security setting on folders causing simple file commands to fail. I can see the base of a drive being locked down by windows.

PW

unread,
Jun 19, 2019, 11:53:51 PM6/19/19
to

>> >
>> >It was a combination of things Ron!!
>> >
>> >Something was wrong with the database(s). Even though I did a compact
>> >and repair on both the code and data, and also recompiled the code, it
>> >did not help.
>> >
>> >So, I copied everything I need into another Access database and
>> >changed the transferdatabase file export path to a subfolder of the
>> >c:\ drive (same errors if I just went to c:\) I now no longer receive
>> >any errors and I have a valid .csv file!!
>> >
>> >So this works!
>> >
>> >DoCmd.TransferText acExportDelim, , "tblRoomsAvailable",
>> >"C:\lodge-ical\GCalRoomAvailability.csv"
>> >
>> >Now I need to see if Google Calendar will accept it. I am planning on
>> >having to make some changes to the file and do some troubleshooting.
>> >
>> >Thanks again!
>> >
>> >One more for the memory bank.
>> >
>> >-paulw
>>
>>
>> *---
>>
>> I successfully imported it into a Google Calendar! YeeHaw!
>>
>> Now what's next? :-)
>>
>> -paulw
>
>Glad you got it working.
>
>Was this a Windows 10 box?
>I have see issues with security setting on folders causing simple file commands to fail. I can see the base of a drive being locked down by windows.

Yes. Windows 10. I checked if both the code and data accdb was set to
read-only but they were not.

But writing to drive C itself and not the folder still generates the
other error "cannot find #GCalRoomAvailability.csv" but works in the
subfolder. That generated the read-only error before moving
everything I needed to another accdb.

I now have a Google Calendar on a webpage that is automatically
updated when the calendar is updated (refreshing the browser when
needed). And with data from my application creating the .csv file.

Pretty cool!

-paulw

Phil Hunt

unread,
Jun 20, 2019, 7:34:21 AM6/20/19
to
Some windows 7 machine also locks down C: drive, forcing you to write to a
folder under C instead. I cannot find where the setting is. Anyone ?


Ron Paii

unread,
Jun 20, 2019, 8:07:38 AM6/20/19
to
On Thursday, June 20, 2019 at 6:34:21 AM UTC-5, Phil Hunt wrote:
> Some windows 7 machine also locks down C: drive, forcing you to write to a
> folder under C instead. I cannot find where the setting is. Anyone ?

Right click on the drive or folder
Select Properties
Select Security
Select Advanced
Select Effective Access
Use Select a user to enter the current login
Select effective access

You can change the access levels or take ownership of the folder.

IMO I would not store files in the base folder, or change permissions on a base folder; you will be opening security holes on the system.

Phil Hunt

unread,
Jun 20, 2019, 8:14:55 AM6/20/19
to
I will try it when I get home to the machine.
The strange thing is I can open Notepad and save the file under C drive. I
just cannot use Explorer left click to new a text doc.

"Ron Paii" <ron8...@gmail.com> wrote in message
news:11b85cd9-7bf3-48e3...@googlegroups.com...

PW

unread,
Jun 21, 2019, 11:16:29 AM6/21/19
to
On Thu, 20 Jun 2019 07:34:18 -0400, "Phil Hunt" <a...@nowhere.com>
wrote:

>Some windows 7 machine also locks down C: drive, forcing you to write to a
>folder under C instead. I cannot find where the setting is. Anyone ?
>


*---

I remember that too. Probably why I changed the extract to a folder
on the C drive way back when.

-paulw
0 new messages