Could not use "Database.accdb"; file already in use - ms-access-2016

This message pops up if I try to Compact and Repair or when trying to save the database as another version of Access. The file is saved in my documents folder on a desktop computer at home with no mapped drives and no other users other than myself - I have tried copying the database to different folders on C: drive and D: drive and also a USB thumb drive - no matter where the database is I get the error. The permissions for the database are myself, SYSTEM, Administrators all with full control

Related

Hyperlink to a file in the current folder regardless of its location on the drive

Putting together a .doc file with a table of content with links to external files. The challenge is: how to make them so that it points to the given file in the current folder regardless of its location on the disk.
Context: I will be sending the set of files to another person, so I can't put the path on my machine, nor on a server since they will be working offline. They will be working on Remarkable device and I want them to be able to use the major overview file with the links to access each of the files, rather than having to browse the folders.

Where does Edge store user's virtualized files?

I'm trying to locate a log file created by a CSP that under IE11 is stored in DRIVE:\Users\USER\AppData\Local\Microsoft\Windows\Temporary Internet Files\Virtualized...
Where are users' temporary files created when using the Edge browser?
I don't have Windows 10 installed on this machine to look for the exact location, but it should be somewhere in this directory:
%LocalAppData%\Spartan
If they've already switched folder names to Edge, then just replace instances of Spartan as necessary. You may need to un-hide hidden folders if you haven't already changed that setting.

Share path between server and client (delphi) application

On my LAN I have 2 applications running in server/client mode developed with Delphi (but I don't think this is important).
On server PC (where run server application) there is a USB hard disk, this hard disk have many folder and subfolder shared on LAN.
Now I need to do this:
1. The server application must send to client application a shared folder (for example "d:\folder\subfolder\", then the client application must open this path to show the files (using explorer).
2. The user, using client application, must select a shared folder (for example "\SERVER\folder\subfolder\") and send this to server application, the server application must convert this path in local path (for example "d:\folder\subfolder\") and save it inside a database.
My problem is: is there a simple way to:
1. Convert the local path to remote path before send it to client se the client can open it easily?
2. Convert the remote path to local path before save it inside database.
NOTE: the main folder or main drive of shared hard disk can be change.
NOTE2: I'd like use IP address and not windows pc name if possible because it can be change.
I hope I explained.
Thanks
If I understand you correctly you want to acces some files that are inside some shared folder. Right?
If that is true then go and acces to these files unsing the network path which is formed in this manner
\\Networkedcomputer\SharedFolderName\Subfolder\...
where:
NetworkComputer is either a name of computer that is sharing that folder or its IP adress. I asume you are interested in using of IP adresses since you already have acces to that information from your other networked components.
SharedFolderName is the network name that was chosen when specific filder was set to be shared on the network. This name doesen't even have to be the same as the name of actual folder
Subolder can be any subfolder of the share folder
In order to get networked path to your shared folder you do need to know network name of the shared folder.
Perhaps you could even retrieve this information from SelectDirectory method which shows special dialog for selecting of directory, but I'm not sure if it does support networked folders. If not you could make use of OpenDialog.
NOTE: In any case when selecting the shared folder either with the use of SelectDirectory or OpenDialog you would need to go to that folder through Network Places (Network -> MyComputerName) and not directly through MyComputer.
But if you need to aquire the shared name for any local folder programatically I think you would have to go and read that information from registry as I'm not sure there is a specific API call for this.
EDIT: The answer on SO question below refers to several Delphi components that can be used for managing of Shared network resources. So I guess you could use to retrieve the network path for a shared local folder but I haven't tried them out.
How do I remotely obtain a system's network shares and connections?

Save files in wp7 in a location other than IsolatedStorage

I have a WP7 application which downloads some files from a server. Now I am saving these files to isolated storage. Is there any option to save these files in a location other than Isolated Storage. No problem for accessing these files from outside the application.The reason is that I need to open these files and show them to the user.
Is there any option to store outside Isolated Storage? If yes, how?
These are the ways you have to persist information in Windows Phone:
Save to a file in Isolated Storage (with the IsolatedStorageFile)
Save in the Application Settings (with the IsolatedStorageSettings)
Save to a database (that will be in turn saved in Isolated Storage)
Send the info to some Internet webservice/remote storage
If it is a picture file, you can save it to the Pictures Library (with the MediaLibrary - sample)
There is no other access to storage in Windows Phone right now!

Making a copy of an ASP.NET MVC website on the same machine - catastrophy?

I wanted to run (using Cassini) two copies of my web application from the same computer - not unreasonable (or so I thought!). One using port 80, the other using port 81. So I did the following:
Stopped Cassini and SQL Express
Copy and paste of the site root folder (and renamed it)
Opened Cassini explorer and setup a new site on port 81 and pointed it to the copied location
Changed the web.config of the copied site so that the connection string used "Database=NewAlias" because SQL Express cant attach two databases with the same alias.
Started Cassini and SQL Express again
When I browsed to the NEW site, the first thing that comes up is:
Unable to open the physical file
"C:\site1\App_Data\db_log.ldf".
Operating system error 32: "32(The
process cannot access the file because
it is being used by another
process.)". Cannot create file 'C:\site2
\App_Data\db_log.LDF' because
it already exists. Change the file
path or the file name, and retry the
operation. Cannot open database
"NewAlias" requested by the login. The
login failed. Login failed for user
'NT AUTHORITY\SYSTEM'. File activation
failure. The physical file name
"C:\site1\App_Data\db_log.ldf" may be
incorrect.
Its trying to open the mdf from the OLD location (even if the web.config specifies the exact mdb path to the new location) but trying to create a log in the NEW location. Then to top it all off, drops the hint that it cannot access the ldf from the OLD location, or maybe cant log into it.
Well done Microsoft and your team once again for some truly intuitive errors! Can anyone help?
I don't think you can just copy a live database via the files. If you detach it first, then copy it, you can then reattach (with sp_detach_db) it by mounting the files as a new database.
sp_detach_db OldDb
Then copy the folder, then reattach (with sp_attach_db) the db files as a new database.
sp_attach_db NewDb, "C:\copy of site\App_Data\db_data.mdf", "C:\site1\App_Data\db_log.ldf"
Another big problem that sometimes occurs when doing this kind of thing (and did in the scenario above which is vaguely eluded to by the error message) is that although the copied MDF file is being used, its still linked to the original LDF (log file). You can run this command to get a list of which files are being used for a connected instance:
sp_helpfile
Which will give you something like this as a response:
name fileid filename filegroup size maxsize growth usage
=========================================================
db 1 C:\site2\App_Data\db.mdf PRIMARY 24192 KB Unlimited 1024 KB data only
db_log 2 C:\site1\App_Data\db_log.ldf 78080 KB 2147483648 KB 10% log only
You can see from the output that the log file is being shared with the old database which obviously will cause issues, so you can change it to point to the copied log file as follows:
ALTER DATABASE NewAlias MODIFY FILE (NAME = db_log, FILENAME='c:\site2\App_Data\db_log.ldf')

Resources