I have code in a Provider-Hosted App for SharePoint which calls the OleDBDataReader class in order to parse a .xslx file. In my development environment, the following exception appeared until I installed this driver.
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. I have moved to pre-production, and the error has popped up again even though the admins of the IIS box are swearing back and forth that the driver is installed. They've sent me a screenshot of the install, and it looks like it's the same version I have. They refuse to uninstall and reinstall it since another application is apparently relying on it at the moment. Is there anything else that I can do on my end other than rewrite the code to look at some way of parsing the .xslx file using its stream instead?
I have read through many of the other topics about this, and I can't seem to find anyone doing something differently.
This thread seems to be about a similar error(granted it's for Access database), but the solution may be able to help with your problem:
In that thread the OP also installed the drivers you've linked ,that also failed so s/he installed these drivers:
http://www.microsoft.com/download/en/confirmation.aspx?id=23734
which worked apparently , try that.
I did a quick search on MSDN and the alternative download for your issue is the Office System Driver: Data Connectivity Components
The solution was for the engineering team to complete "repair" on the installation from add/remove programs.. This took forever to have them try, but it worked!
Related
I recently had a new project assigned to me (I'm new to C# and I'm a junior). It makes use of a Microsoft access database file (.accdb file)
I've imported the project into Visual Studio but I can't for the life of me run the code. Initially I had file register issues, and I think I managed to resolve that by getting the IT teams to install a "2007 Office System Driver: Data Connectivity Components" driver from the Microsoft website.
Bow the error says:
System.Data.OleDb.OleDbExceptions: 'Cannot open database''. It may not be a database that your application recognizes, or the file may be corrupt.'
The team I'm trying to help only has one dev (working from a different country) who is the main person to handle the code. It works on her side, but she doesn't really have the experience to help me troubleshoot this.
I tried sending her my database file, for her to swap her file for mine, and she said it was still working, so it sounds like the issue might not be to do with the file?
Could I get any help if possible? So far my only approach is to keep googling the error.
But the only resolutions I see are from people who have database files nearing their file size limit (2GB). My database file is just 1MB.
The database file is password protected (the password happens to be in the code). I opened the database file (Microsoft access opens) and entered the password and I had no issue accessing the data)
Out of luck, I managed to find the right article to help me!
The issue with Microsoft access database files is only one user can really use then at a time I believe.
I saw a forum about potential locks made by other users. I googled how to remove locks but it seems that it might not be a lock issue (Microsoft creates a lock file which I dont have).
Regardless, I assumed that the issue is still somewhat similar. Since I had access to the database in Microsoft Access, I decided to open a new database, then go to external data tab and click on access to import EVERYTHING from the other file. Then I just renamed to old file and give my new file the original name.
I reran the code and it worked!
I dont know why the other dev had no issue opening the file. My assumption is that because she is the only developer her laptop is already 'set up' in some way to run everything as normal, whereas if someone new tried (or if something happens and she has to re-open the code on a new laptop) they would have to try and replicate the 'set up' or try and work from scratch
Hope this helps
Quite straight forward really (well i would have thought) I am trying to create a little launcher app in C# that copies the latest version of a access database to the users C Drive and runs it. I have done everything i want except the running it part. What? would have thought that was the easy part.
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = "path to the db.accdb";
proc.Start();
Now this kicks off Access ok, but when it opens Access fires an error message
"database not attached"
I have tried so many different ways and get the same result.
Further information: On my machine there are two versions of Access, 2016 (Office 16) and a Runtime version which is Office 15.
The runtime version was the most recently installed so it is what is assigned to the file type, which is the desired behaviour.
I havent tried uninstalling the runtime version to see if it works, because its the runtime version i want to use ultimately.
Any help would be greatly appreciated.
Dont worry, I am an idiot. Error message was coming from my own code in the Autoexec macro of the database.
I think i can sort it out.
I know this question has been asked lots of times but mostly I couldnt find the answer I was looking for.
How do popular applications update themselfs ?
I found some libraries that update applications but mostly they just replace all the application files. This way my Updater would need to download around 200mb everytime.
Also ClickOnce is used a lot but this in my oppinion is an ugly way to update and install because the GUI is not really fancy and you can't even specify where to install the application.
I know some applications also replace the installer and just run the new one to deinstall the old version and install the new one but that cant be that right way...
So how do Programs like Mobirise, Discord or Teamspeak update themselfs ?
I have a have made a POS Solution(C#), working in 4 Shops.
This is what i've done to give client side updates.
Used Google Drive to upload installer file + a text file mentioning installer version, once uploaded each time the programe starts up it downloads the version text file from Google Drive, if it doesn't match the current version of the software which the clients Has, Messagebox Prompts a newer version is avaliable. Client then can click Upgrade and it will download the installer file, once downloaded software exits completely calling a python script which will Run the installer file.
This is not the best way but it works, becouse Google Drive has its own file version history which makes it easy for me to keep track of updates i send.
Hope I Helped <3
You can design the application to be patchable.
Patching is not a hot flavour in windows world.
I am writing a C# console application which collects data about a machine and writes it to an external database. One of the bits of information it is necessary to collect is information about the software that is installed. There is a set of specific pieces of software we have that we would like to know about. Specifically which ones are installed, which versions are installed, and which patches they have had applied.
I have managed to acquire the information about which software is installed, and which versions they are, by querying the registry. However, when it comes to figuring out which patches are installed I am a little stumped.
I know that if I go to Control Panel -> Programs -> View installed updates I can see the patches I have installed for these software (specifically, it gives me the exact patch number - ie, Patch 21). So, I would like something similar. I found WUApiLib and thought it would be the answer to my problems, but when I query the update history all that is returned is a list of Microsoft updates to the OS, .NET, Visual Studio etc. There is no mention of the patches I applied to our software.
I am not very familiar with how patching works, but I believe the patches use msp file format, so I think the information should be logged by Windows somewhere. How does Control Panel get it? Where might I be able to get it? The registry entries under HKLM/SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall do not mention patches at all.
So, after some digging around I found a different part of the registry which lists all the information I needed.
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products
This contains the name and version of software installed (under <GUID>\InstallProperties) and patches installed for each (under <GUID>\Patches)
I'm currently searching for a way to make it possible to deploy and update a C# .NET application over SFTP. Background is that most of my users do not have admin rights, internet access rights or common file structures/group policies. The best I could actually get was the ability to also use the SFTP-infrastructure the application already uses for data transfers.
So I tried using Visual Studio publish, which can deploy the application initially, however it does not support the update mechanisms (it only supports URLs and File Paths). A manual update/deployment process is out of the question, however, purely through the sheer size of the userbase (1000+ users).
I then had a look at wyBuild, a third-party build-tool that can actually use sftp to upload Updates. It can not, however, download them via sftp.
So I'm reaching somewhat the end of my rope here. Writing an updater myself seems like a large time investment, but I could not find any other solution. How would this problem be solvable? Thanks for any help in advance.
Oh, and before somebody flags for "asking for a tutorial", I tried hard to stay within the guidelines stackoverflow provides here