473,395 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

TransferText - Permission Denied

IN trying to export a Jet query (an actual saved Jet querydef which is
written against a pass through query - not that that should be a
problem) to text via either the File->Export... menu item or using
Transfertext, I get an error to the effect that permission is denied.

The VBA line shown below - I tried using the specification

DoCmd.TransferText acExportDelim, "QryOracleView Export Specification",
"qryOracleView", strSaveFile, -1

I get an error 3051 for the above line or when doing it via the menu is
as follows:

The Microsoft jet database engine cannot open the file
'qryOracleView-2006-08-24.txt'. It is already opened exclusively by
another user , or you need permission to view its data.

Yet, I have no problem doing the menu method and exporting to Excel.

What is going on?

Thanks in advance for any help on this...
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Aug 24 '06 #1
6 6860
IME, Windows often gets itself confused about file permissions, so the issue
might be that the file exists and it is not being overwritten. Try:
If Dir(strSaveFile) <vbNullString Then Kill strSaveFile

If that also fails there is an issue with the file.
If it solves the problem, you're home.
If it doesn't solve the problem, then the issue is elsewhere, such as with
the import/export spec.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Tim Marshall" <TI****@PurplePandaChasers.Moertheriumwrote in message
news:ec**********@coranto.ucs.mun.ca...
IN trying to export a Jet query (an actual saved Jet querydef which is
written against a pass through query - not that that should be a problem)
to text via either the File->Export... menu item or using Transfertext, I
get an error to the effect that permission is denied.

The VBA line shown below - I tried using the specification

DoCmd.TransferText acExportDelim, "QryOracleView Export Specification",
"qryOracleView", strSaveFile, -1

I get an error 3051 for the above line or when doing it via the menu is as
follows:

The Microsoft jet database engine cannot open the file
'qryOracleView-2006-08-24.txt'. It is already opened exclusively by
another user , or you need permission to view its data.

Yet, I have no problem doing the menu method and exporting to Excel.

What is going on?

Thanks in advance for any help on this...
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me

Aug 25 '06 #2
On Thu, 24 Aug 2006 17:15:22 -0230, Tim Marshall
<TI****@PurplePandaChasers.Moertheriumwrote:
>IN trying to export a Jet query (an actual saved Jet querydef which is
written against a pass through query - not that that should be a
problem) to text via either the File->Export... menu item or using
Transfertext, I get an error to the effect that permission is denied.

The VBA line shown below - I tried using the specification

DoCmd.TransferText acExportDelim, "QryOracleView Export Specification",
"qryOracleView", strSaveFile, -1

I get an error 3051 for the above line or when doing it via the menu is
as follows:

The Microsoft jet database engine cannot open the file
'qryOracleView-2006-08-24.txt'. It is already opened exclusively by
another user , or you need permission to view its data.

Yet, I have no problem doing the menu method and exporting to Excel.

What is going on?

Thanks in advance for any help on this...
I have seen this error on occasions if the filename exceeds 12 characters.
(Isn't it obvious from the error message :)

Try shortening the file name to OracleView rather than qryOracleView.

Wayne Gillespie
Gosford NSW Australia
Aug 25 '06 #3
Tim Marshall wrote:
The Microsoft jet database engine cannot open the file
'qryOracleView-2006-08-24.txt'. It is already opened exclusively by
another user , or you need permission to view its data.
Wayne and Allen, thanks for your responses, but neither is working.

What's particularly odd is that once I specify a file name and get my
error, the file has actually been created... you can go to the folder
and see the text file. however, when you try to open it when your app
is still open, I get an error message in notepad telling me the file is
in use. Only when I turn off the mdb does Wondows allow me to open the
file and then it's a small 1kb thing with just the headers, but no data.

Odd. I've contacted MS Support - regardless of what anyone says, I've
found the expense worth it in the past when I've been hit with something
I can't google or news sleuth! 8) I'll post results if I get anything
to work.

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Aug 25 '06 #4
Post the answer when you get it sorted out, Tim.

I suspect I did run into this once, but can't recall the detail. Seems like
there was some reason why the export was failing after it started, such as a
bad import/export spec.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Tim Marshall" <TI****@PurplePandaChasers.Moertheriumwrote in message
news:ec**********@coranto.ucs.mun.ca...
Tim Marshall wrote:
>The Microsoft jet database engine cannot open the file
'qryOracleView-2006-08-24.txt'. It is already opened exclusively by
another user , or you need permission to view its data.

Wayne and Allen, thanks for your responses, but neither is working.

What's particularly odd is that once I specify a file name and get my
error, the file has actually been created... you can go to the folder and
see the text file. however, when you try to open it when your app is
still open, I get an error message in notepad telling me the file is in
use. Only when I turn off the mdb does Wondows allow me to open the file
and then it's a small 1kb thing with just the headers, but no data.

Odd. I've contacted MS Support - regardless of what anyone says, I've
found the expense worth it in the past when I've been hit with something I
can't google or news sleuth! 8) I'll post results if I get anything to
work.

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me

Aug 26 '06 #5
Tim Marshall wrote:
Tim Marshall wrote:
>The Microsoft jet database engine cannot open the file
'qryOracleView-2006-08-24.txt'. It is already opened exclusively by
another user , or you need permission to view its data.
Post script:

It turns out, to my great chagrin and 3 weeks of serious inconvenience
for the space planners my app is used by, that the specification name
used by my docmd.transfertext line was referring to an export spec that
was not appropriate for what I wanted to do - in this case, it was comma
delimited and my data was full of commas.

I do find the dialog for saving specs a bit tricky to work with and one
has to be careful that one verifies that what you've saved is indeed
what you want to be actually saved.

Anyway, there you go, for Google posterity... 8)
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Sep 14 '06 #6
Thanks for posting the solution, Tim.

Agreed that the error messages associated with bad import/export specs are
not always helpful.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Tim Marshall" <TI****@PurplePandaChasers.Moertheriumwrote in message
news:ee**********@coranto.ucs.mun.ca...
Tim Marshall wrote:
>Tim Marshall wrote:
>>The Microsoft jet database engine cannot open the file
'qryOracleView-2006-08-24.txt'. It is already opened exclusively by
another user , or you need permission to view its data.

Post script:

It turns out, to my great chagrin and 3 weeks of serious inconvenience for
the space planners my app is used by, that the specification name used by
my docmd.transfertext line was referring to an export spec that was not
appropriate for what I wanted to do - in this case, it was comma delimited
and my data was full of commas.

I do find the dialog for saving specs a bit tricky to work with and one
has to be careful that one verifies that what you've saved is indeed what
you want to be actually saved.

Anyway, there you go, for Google posterity... 8)
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me

Sep 14 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Klunk | last post by:
Hi, last week I moved the folder of my Intranet application to another disk of the same server. After this change all the ASP page return this error: Microsoft VBScript runtime error...
1
by: Mark E. Hamilton | last post by:
Sorry, I probably should have re-stated the problem: We're using Python 2.3.5 on AIX 5.2, and get the follow error messages from some of our code. I haven't yet tracked down exactly where it's...
10
by: Florian G. Pflug | last post by:
Hi I installed a postgres-application (which was developed on debian woody) on red hat 9 today, using the postgres 7.3 rpms from redhad. One of my the triggers uses the pg_settings table (more...
2
by: Taishi | last post by:
New user of SQL Everything is on the same machine My error is close to the bottom After reading it today, I can see there is a problem with 2 dbases 'PUBS' and 'Master' There are also some...
4
by: stephen | last post by:
Hi, I am getting an error while trying to create an excel file. "Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the...
0
by: debug03 | last post by:
I am executing a DTS package on a Windows 2000 sp4 server running SQL Server 2000 and IBM DB2 V7 client. The DTS package source data(SQL Server) is selected from SQL server table and inserts data to...
0
by: private.anders | last post by:
Hi David! Really need assistance since I have been struggling with a problem long time now. I am running a web application on a Win 2003 Std (Active Directory). Everything works fine. I have...
0
by: private.anders | last post by:
Really need your assistance since I have been struggling with a problem long time now. I am running a web application on a Win 2003 Std (Active Directory). Everything works fine. I have...
4
by: xzzy | last post by:
I have a v1.1 web app that works on my local computer. However, running it at the host computer, the following breaks: when a viewer selects a different country, the State dropdown should...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.