ASP Weird Unspecified Error - 80004005 - ms-access

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.

Related

SSIS Package Error "Cannot update. Database or object is read-only." for Excel Destination

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

ERROR [3D000] [MySQL][ODBC 5.3(w) Driver][mysqld-5.7.9]No database selected

I've got WampServer running a local instance of WordPress, and I have SSRS running in native mode.
I've written a report that queries the MySQL database, and it works and runs just fine within Visual Studio.
If I launch it though, it first had issues with my ODBC shared data source, which was as follows:
Name of shared data source: localhost.rds
ODBC Connection string: Dsn=localhostuserDSN
That DSN is a user DSN (as you might've guessed), and it uses the MySQL ODBC 5.3 Unicode driver. It's configured as follows:
TCP/IP server: localhost
Port: 3306
User: root
Password: <blank>
Database: wp
When tested, the connection succeeds, and the report works just fine.
When deployed though, I got the following error:
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
After much research and hair-pulling, I finally found out that if I changed the data source connection string to...
Dsn=localhostUserDSN;Driver=MySQL ODBC 5.3 Unicode Driver
...that also works, and at least then, the connection also succeed when in the Data Sources configuration screen for the report after it's deployed. But then, just when I thought I was finally out of the woods, I run the report and get the following error message:
ERROR [3D000] [MySQL][ODBC 5.3(w) Driver][mysqld-5.7.9]No database selected
The thing is, I can't specify a database, or at least I don't know a way to.
If I try changing the connection string to...
Dsn=localhostUserDSN;Driver=MySQL ODBC 5.3 Unicode Driver;database=wp
...it says the (blank) password isn't valid, before I've even pressed the 'Test' button.
If I tack on 'USE [wp]' to the query in Visual Studio, it abruptly protests.
I thought maybe I'd get around that by putting it in a stored procedure, but since the data is being queried directly from the MySQL database, I can't do that either.
(Before attempting any of this, I already tried syncing/converting the MySQL db to the SQL db, but I kept running into issues with the data conversion.)
Thinking it might be a permission issue, I've also tried running...
GRANT ALL ON [wp] TO root#localhost;
...and...
GRANT ALL PRIVILEGES ON [wp] TO root#localhost;
in SSMS, but in both cases, it says:
Cannot find the object 'wp', because it does not exist or you do not have permission.
And I'm the only admin on a local machine. I installed SQL and it uses Windows Authentication, so I don't see how I wouldn't have permission, and I have to assume it's an issue with the syntax.
I saw elsewhere here that someone suggested '[wp].*', but it doesn't like that either.
I've been at this literally all day, and I'm at my whits end, so any constructive feedback would be greatly appreciated!
For anyone stumbling across this in the future, I think we resolved the original issue, although I've run into other issues which may be specific to me.
Three things, not sure if the first one is related:
1) In the query for the dataset of the report, I specified the table like so "SELECT wp_posts.ID FROM wp_posts" instead of just "SELECT ID FROM wp_posts".
2) I went back to adding on "database=wp" to the ODBC connection string.
3) Even though both work in Visual Studio, I switched to a System DSN instead of the User DSN.
I think that should get you back in action.

Classic ASP + MS Access on Server2008R2 (IIS 7) - read but can't write

I'm trying to get my Classic ASP application (works great on Server 2003/IIS 6) working on IIS 7.
I've done a zillion things recommended and finally got it actually pulling up the ASP front page that reads from a database.
But when I try to write to the database, I get errors. "Microsoft JET Database Engine error '80004005' Operation must use an updateable query."
Note: In the application pool for this classic ASP site I created an identity of "app_pool_casemodo" and then gave [website folders], [database folder], windows\temp, inetpub\temp, and windows\serviceprofiles\networkservice\AppData\Local\Temp all modify permissions for that user.
I installed Microsoft's Process Monitor and it is telling me there is an issue with a user account "app_pool_casemodo" having sufficient read/write permissions in relation with this registry key: HKLM\SOFTWARE\Wow6432Node\Microsoft\Jet\4.0\Engines. So I used regedit and browsed to that key and made sure that account had plenty of permissions.
Tried using DSN and tried using just file pointing ODBC string and both exhibit read but no write issue.
Image of process monitor screen attached.
Please help. I've been banging my head for many days on this stuff. Feeling like I'm super close to a solution.
The user IUSR_< MACHINENAME > has permission over the access file?

Connecting to an Access database in Classic ASP using an ADODB object

I am new to classic ASP. I would rather ask question than do hour of research to solve my problem.
I am accessing access database and getting the following error.
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/default1.asp, line 30
The culprit line is this
Set MyConn = Server.CreateObject("ADODB.Connection")
MdbFilePath = Server.MapPath("c:\database\MyDatabase.mdb")
Well, I do not have Access installed but I copied the .mdb file to the specified folder, will it work that way? I am familiar with SQL Server, and that has to run in order to retrieve data from it.
It uses ADODB but I can't file the DLL. Can someone specify the DLL for me. What I have to do to get it working. Just registering it will work using regsvr32 my.dll?
I could not find a connection string (I usually use a connection string to connect to my SQL Server). Do I need one for Access database in this case?
Please help
It's been a few years for me, so this answer might be a little out of date. Also, since the Access db ends in .mdb, I'm assuming that it's a pre-2007 database.
Yes, just the file should work. Access does not need to run, it just needs to read the file. However, you may need certain components installed to talk to the Access database (used to be MDAC
- http://www.microsoft.com/download/en/details.aspx?id=1953, not 100% certain if it still is). MDAC contains the JET engine, which classic ASP uses to talk to Access files.
As for the connection string, this web site that provides some examples of access connection strings: http://connectionstrings.com/access
edit - adding more info
Just in case I'm not following the comments correctly, here's an example of how to connect to the Access database through Classic ASP:
Set MyConn = Server.CreateObject("ADODB.Connection")
MdbFilePath = "c:\database\MyDatabase.mdb" ''# Server.MapPath is not needed, since we are providing the whole path already
MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & MdbFilePath
When running the code above, do you receive the error still? Also, what's the set up you're running (IIS7, IIS6, 32bit, 64bit)?

MDE Access decrypt JDBC

I want to perform JDBC SQL queries on a MDE Access file.
I've set up the data source ODBC and everything worked well for a MDE file.
Now, I'm working with a newer version of the MDE file, and here is the result:
java.sql.SQLException: [Microsoft][Driver ODBC Microsoft Access]
Cannont read record. Read authorization unavailable for "tbl_mytable".
If I open the MDE with Access Runtime I am asked for a password, and after leaving a blank password I can see all the data. Of course, "tbl_mytable" does exist inside the database.
I assume that you did not make the MDE yourself. As David said, there is no advantage to convert a MDB database to MDE if it is just going to be used as a database file and not an application.
Anyway, it looks like some group security was put in place on the new version of the MDE database you are using.
You need to check with the person who created the original database if they set up security so they can give you the proper username and password needed to access it again.
Once you get the username/password, you can either change your ODBC data source settings or the connection string you are currently using, usually by adding a "UID=username;PWD=password;" to it.