Ive got an mde file and all i need is to get data from tables of this file in any format... I've tried everything that I could find on the internet or get by myself, but nothing helps. When I am using standard tools for extracting data in access it says to me, that I have something running operations on that database( I think there is some kind of a macro or something else, that starts when I open this file).
If you have any info on how to get data from this file I will be SO thankfull!
Thaks again for your attention and I really sorry for my bad english(doing my best to learn speaking it better).
There are a few tricks you can try:
Press SHIFT when opening the file to disable autoExec macros.
Just in case the file is corrupted, try to compact and repair it (make a backup copy before!).
You can use the command line option /compact to perform the compact and repair without first opening the file.
You can create a new database and create linked tables from the other database.
You'll have the option of copying the whole tables (you may need to rename the .mde into .mdb so you can see it in the dialog asking for the file to link to).
Related
I have 70 workbooks where all the worksheets are connected to oracle data source. My team is going to migrate the exact same data on Amazon RDS. So now I want to repoint all the Tableau worksheets to the mysql. Is this possible without recreating anything? If so, is there a way to do it for all the worksheets as opposed to just one at a time? I tried with all the methods mentioned on Jawon Apr 30, 2009 3:16 PM posts:- Repointing existing workbook to a new datasource , but nothing worked for me. Is there any way where I can find the mapping of oracle connection for example:- name='oracle.41528.731775173612' in the .twb file to tables and schemas?
It's not easy or pretty but it can be done. It involves hacking the XML of the twb file. These steps give you a general idea and there are ways to streamline the process. Before starting this process, I strongly encourage you to make a backup copy of your twb files. If this goes wrong and you don't have a backup, there's no recovery.
Make a copy of your twb file.
Open the copy. Create a new data source pointing to the new location. Build out that data source. Save your workbook.
Run a diff between the original and new twb files. Look for the connection information that is different.
Using a text editor or other program that can make changes to multiple text files, do a search and replace. I use Notepad++ for this. There are plenty of options out there.
Essentially what you are doing is finding what changed in the connection info when you modified the first file. Then you apply that change to all the other files.
Things get complicated if you have schema name changes or any other types of changes to table name or columns. For that reason, it may be advisable to change the files one at a time, opening each one in Tableau to correct any problems as you find them.
I have an access database that is on a network drive that multiple users can access. The database corrupted this morning and I am in the process of trying to fix it. The problem I am having is when I attempt to rename the database it says it is currently in use by someone. There is no .ldb file associated with this file so at this point and am dead in the water because I can't rename it, compact it or anything.
Does anyone have any suggestions?
Thanks
Copy the database to another location. The copy wont be locked. Then you can work in ways to save your work until you solve the lock problem in the original file. If your problem is due to VB code file corruption, try to open the database with the "/decompile" option:
Start-Run:
"C:\Program Files\Microsoft Office\Office\msaccess.exe" "C:\example.mdb" /decompile
If you haven't any ldb file associated with the mdb, it will be difficult to discover what user is locking your database. If you have few users, you should restart their machines. It would be prehistoric but should be fastest than trying to unlock the file through other ways.
Just had to do this, Try "F11" then select "tables", select topic and click open, from there it a simple C&P into excel sheet.
Hope this helps
Dave Pragnell
ldb file is automatically created when first user opens the DB, it tracks the number of users who have opened the DB and locking status of every object
so if one user is open in read only then 2nd user can edit db
this file automatically deleted when last user close connection to the db file.
You dont manually delete/modify this file, as it may result into inconsistent state of DB
You can open this file in Notepad and check how many users have opened this file, But DONT change anything.
What does Error 3112 indicate when compacting an MDB file?
The Error description is "Records can't be read; no read permission on 'xyz123.mdb'"
There is a known issue with the Compact function on some versions of Access MDBs. Is the solution in this case to run the Microsoft utility JETCOMP.EXE on this file?
What are the other possible causes of this error?
This could well be a sign of corruption, I would suggest that you treat it like that for now and try doing a compact/repair and also a decompile and see if that snaps it out of it.
This is of course assuming that you do have permissions on the database, you might also want to check which workgroup file you are “joined” to at the moment in case the above does not work
I can't say the error pertains to any one issue I can think of. It possbile that some other routine or part of the applicaton is open and not closed.
I assume this error is occurring for only one application ?
Try creating a blank database file, and then import everything into that file. Does the compact and repair now work? This sounds more like a damaged or currupted file.
I have a corrupt database. If I open it in MS Access, MS Access offers to repair it, and it succeeds.
How can I do that with code? On a machine where MS Access is not installed.
I know from trying it that JRO.JetEngine.CompactDatabase does NOT work.
In other words, I want to do what Access or JETCOMP.exe is doing, not what JRO.JetEngine.CompactDatabase is doing.
You need to go to http://support.microsoft.com and search for the JetComp.exe utility, which will attempt to repair and compact your MDB without opening the file. The reason none of the suggestions above work is because they have to open the MDB to do their work, whereas JetComp doesn't open the file, but operates on it structurally.
If it can't recover your file (which does happen), then you'll have to go to a data recovery service. I recommend Peter Miller of PKSolutions.com.
Command-line switch for opening a .mdb file:
/compact
It repairs and compacts the database file.
If you leave out a target file name following the /compact switch, the file is compacted to the original name and folder. To compact to a different name, specify a target file.
Have you tried DBEngine.RepairDatabase [my.mdb]? (which doesn't seem to work any more even when you reference an earlier version)
However, if is happening so often that you need to code it, you probably have a bigger problem you should be solving first.
If you are willing to use separate utility, how about the Jetcomp.exe utility (http://support.microsoft.com/kb/295334 ). It is supposed to "be able to recover some databases that the Microsoft Access compact utility and the CompactDatabase method cannot." In which case, all you need to do is execute the external application.
e.g.,
Call Shell("Jetcomp.exe <arguments>")
I'm not a MS Acccess guru, but it appears as though this utility contains the DLLs you'd need to compact and repair a corrupt database file.
I'm working on a MS Access database. I've made some changes to one of the modules. I want to go out for lunch, but when I try closing the database, I get the following message:
"You do not have exclusive access to the database. Your design changes cannot be saved at this time. Do you want to close without saving your changes?"
I'm pretty sure nobody else on the network has the database file open, and I don't have any other Access databases open. I'm probably missing something obvious, but would really appreciated some help!
Update:
In the end I copied all the code, closed the database without saving, re-opened it and pasted the code back in. I was then able to save the database. I'm not sure if this was a one off, but I'll report back if it happens again.
If you're sure no one else is in the db but you, it's an additional connection to your db from your own pc. You can verify this with the LDB viewer, downloadable in the free JetUtils.exe download from Microsoft:
http://support.microsoft.com/kb/176670
Look through your code and check if you have two separate database objects in the default workspace or another database object in a separate workspace. That will cause this problem.
To fix it, make sure the database objects are set to nothing before they go out of scope, and if you opened the database object in code, you also need to close it before setting the database object to nothing.
=============================================
Update in August 2022:
The MS link above no longer works. The document remains available on Archive.org, but is outdated. A document that appears to provide the current version of its information is at:
https://learn.microsoft.com/en-us/office/troubleshoot/access/determine-who-is-logged-on-to-database
This provides VBA code for a sub to obtain a list of users. The writer of this update has tested that code successfully in Access 2019.
If you close the database and are sure nobody else has it opened, check to see if there is a .ldb file (it will have the same name as your database file). If the file is there, then there is a good chance it is still in use.
Is it being access by a service, like a website?
You could copy the database to another sub-directory and make your changes. If that doesn't work, I will have to look that up. Of course there is always the database tool, "repair and compress database..."
Is the file located on a file server? If so check to see if any users have a file handle to it.
If it still doesn't work, update your post with your new information and we'll go further.
UPDATE (9/26):
Another thing I do when having strange issues with access databases with contain vba code is decompile. I don't know if this is documented yet, I haven't looked in years, but it's was (at least) an undocumented switch to msaccess.
From a cmd line:
change directory to where msaccess.exe is located.
Run the following command
msaccess \path to access file\databasefile.mdb /decompile
usually runs very quick then opens the database. Open any module and compile.
Doesn't always work, but sometimes can remove strange happenings.
Did you ever trying to copy the database to another directory and making your edits? That should of worked; you could then rename the original and copy the file back.
Anyway, I am glad you are working again.
If even a word mail merge is linked to the access database, that counts as an access connection.
Very simple.
Close all of your MSaccess files.
Open task manager (by right click on task bar).
Select Processes tab in that.
If the list has a msaccess*32 process close that by clicking on End Process.
This worked for me. I think it closes all the recordset which we have not closed in the codes or which is closed forcefully.