When I execute a package in Visual Studio it works fine. However, when executing that package in SQL I run into this error "Cannot update. Database or object is read-only." and the Subcomponent name for this error message, is Excel Destination.
I tried adding "IMEX=0;Readonly=False", to the connection string of Excel Connection Manager but didn't help
I saw this https://stackoverflow.com/a/42654325/12021687 and I know my database is read-only (which I can't change) but I don't believe it relevant to me as the Subcomponent name of the error message is Excel Destination.
Can someone guide me on what may be causing this issue?
Permission Issue. Package may not be running under the user you are expecting.
Try changing the security permissions of the file/folder to full control for NT SERVICE\SQLSERVERAGENT.
Rerun the package. If this works check who the file was last saved by and give this user the required permissions.
p.s. Very Frustrating issue for myself too!
Edit
Also before I found the above as soloution:
I set DelayValidation = True everywhere in the Project.
Added ;READONLY=0 on the connection string
I'm trying to get a windows Scheduled Task to open up MS Access DB (.mdb) which has an AutoExec macro that runs some queries and then exports it to a .csv replacing the .csv file that is already there.
From the command prompt I can run:
"C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE" "/Path to my Access DB"
and everything works perfectly. Access opens up, runs the query, and replaces the .csv with new data from the query.
When I try to do this with a Scheduled Task access just deletes the .csv file without ever replacing it and returns the error "the operator or administrator has refused the request".
Any ideas? I was looking for a quick way to get the data but I feel like I might be better off just writing some python to connect to Access.
I was able to return to this problem this week and finally found the solution.
The problem came down to the scheduled task. It was a local machine permissions issue and running the task with the correct domain that solved it.
First to fix the local machine permission I had to make sure that the user running the task had "Log on as a batch job" permissions.
Found at Control Panel -> Admin Tools -> Local Security Policy\Local Policies\User Rights Assignments -> "Log on as a batch job"
Second, because I was on a domain the schedule task had to be explicitly created by the domain user. I had to manually find the user on the domain during the creation of the task and remove the user that was auto populated by the task scheduled creation wizard.
The following error message was constantly appearing for me while trying to run the following OLE commands from AHK:
acc := ComObjActive("Access.Application")
acc.DoCmd.OpenForm("frmSearchLayer",0) ;acc.DoCmd.OpenForm("frmSearchLayer",acNormal)
When closing down my applications I noticed one of my VBA windows was currently open meanwhile being still connected to a COM object from the same database I had been trying to access.
The method to solve my user case:
Check task manager and quit all instances of MSACCESS.EXE
We've got a lot of Access databases (typically 2007) and we find this with nearly all of them as of recently. When a user launches a database it works perfectly fine until they close it down, any subsquent launches give an error on startup...
Execution of this application has stopped due to a run-time error
Users are using Access Runtime and I have access to the full version for legacy development purposes. One thing we have found is that after the first launch there's a hanging MSACCESS.exe process, if you bin it off then it fixes Access temporarily.
We have attempted compacting the databases to no avail.
Is there anyway to get a more detailed error? I have checked event viewer and also set the startup form to none, yet the issue still occurs.
Open one of the offending database and watch when the error kicks in.
That should lead to either an error message or the code window with the error highlighted.
I had to work on an already made website, just adding some small module
While i was updating, there was many files called myDB.mdb in the different subfolders
i wanted to make sure that my app is connecting the right database
so i started renaming subfolder...at one of those subfolders, i refreshed,the main site and mine stopped working
i renamed back to the correct name.. refresh... refresh... refresh.. i am still refreshing and i started another browser.. it is giving a connection problem :S
Provider error '80004005'
Unspecified error
/new/conn.asp, line 13
any idea about his :S
would appreciate any help !
I have had the same problem. The first time I loaded a page it worked well, but if I loaded the page again quickly, then I got this error. If I waited for a while then I didn't get the error. It must be because when you call objConnection.Close it takes some time to actually close the mdb file, so if you try and open it again you get the "File already in use type error". Strangely adding a mode to the connection sorted this problem out for me. It doesn't have to be read only, read / write works as well.
objConnection.Mode = 1 ' read only
Microsoft OLE DB Provider for ODBC
Drivers error '80004005'
[Microsoft][ODBC Microsoft Access
Driver] The Microsoft Jet database
engine cannot open the file
'(unknown)'. It is already opened
exclusively by another user, or you
need permission to view its data.
or
Microsoft OLE DB Provider for
ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access
Driver] '(unknown)' isn't a valid
path. Make sure that the path name is
spelled correctly and that you are
connected to the server on which the
file resides.
or
Microsoft OLE
DB Provider for ODBC Drivers error
'80004005' [Microsoft][ODBC Microsoft
Access 97 Driver] Couldn't use
'(unknown)'; file already in use.
From: http://tutorials.aspfaq.com/8000xxxxx-errors/80004005-errors.html
Whatever happened, it is resulting in an 80004005 error, so the problem is definitely a permission issue.
Depending on the configuration of the web server, it may not be the IUSR account that needs the access. I find it's best to fire up FileMon, filter it to the name of my database (with wildcards), and check out the properties of the error that shows up. Viewing the properties will show you the user that is actually trying to access the file.
For Access databases, you want to make sure that you're modifying the permissions of the folder and not the file. You'll need Modify permissions on the folder so that the .ldb file can be created.
Check that the IUSR account has permissions on the Access database and the folders/sub-folders containing it. I've found that on occasion if you rename or compact an access database it loses IUSR priviledges so appears in use / locked
I had the same error on Access DB :
Provider error '80004005'
Unspecified error
Reason was that one of the pages included files was not in the right format (UTF-8) but ANCI
When I changed that file to UTF-8 , everything woked right !
greeting otto
Googled in but the issue was spaces in the filename for my situation. Remove them and no problems. I hope that will help someone else.