Alternative to system.data.oledb

Stef_2891

Member
Joined
Dec 17, 2023
Messages
13
Programming Experience
1-3
My c# application will run on target machine we’re I’m not administrator and I cannot register provider Microsoft.ace.oledb.12.0
My application uses this provider to transfer data from excel to access database .accdb.
For this reason I cannot install Microsoft access engine 2016
Is there any alternative to this library?
Is is possible anyhow to include this DLL in application during compilation?
I’m using .NET CORE v8 and windows 10/11
 
I’m doing some try with unsuccessful outcomes. However I understood the issue is non on the target machine because if I compiled my app with 32bit it doesn’t work and when connection is open, I’m debugging as well, an exception is generated, Microsoft.ace.oledb.12.0 is not registered on your local machine therefore IHave to compile with “any cpu” but if I go on target I got same issue.

I confirm application will run a published version .NET 8.0 and and oledb handles on installed
 
Um... I think you need to use .NET Framework 4.8. .NET 8 is not installed with Win11.
 
Um... I think you need to use .NET Framework 4.8. .NET 8 is not installed with Win11.

I don’t think this is the issue. I have published .net 8 into compiled app so the app is using framework itself .
My visual studio version supports only net versione (from 5 up to 8) and net core versione
 
If I select "Any CPU" with .NET 8, I get the not registered exception:
1703097358923.png



But if I select x86, then all is good:
1703097457698.png


Make sure that when you are publishing, you are publishing for x86 as well. Some people forget the default publishing profile picks Release instead of Debug, and that the settings selected for Debug do not always automatically get carried over into Release.
 
If I select "Any CPU" with .NET 8, I get the not registered exception:
View attachment 3056


But if I select x86, then all is good:
View attachment 3057

Make sure that when you are publishing, you are publishing for x86 as well. Some people forget the default publishing profile picks Release instead of Debug, and that the settings selected for Debug do not always automatically get carried over into Release.

I don’t really understand …i have a different behaviour and tho is not acceptable. Any cpu same bevaiour… x86 I got exception. X64 it works…I will tell you what is on target hopping the same behaviour
 
If x64 works for you, then just run with it, and deal with any tickets you get in the future. Recall iterative methodology, and fail fast.
 
I don’t really understand …i have a different behaviour and tho is not acceptable. Any cpu same bevaiour… x86 I got exception. X64 it works…I will tell you what is on target hopping the same behaviour

The same on target machine…x86 does not work, x64 does not work…
 
My c# application will run on target machine we’re I’m not administrator and I cannot register provider Microsoft.ace.oledb.12.0
My application uses this provider to transfer data from excel to access database .accdb.
For this reason I cannot install Microsoft access engine 2016
Is there any alternative to this library?
Is is possible anyhow to include this DLL in application during compilation?
I’m using .NET CORE v8 and windows 10/11

It is not clear to me whether you must use an Access database or if you are asking if there is an alternative database that can be used.
 
It is not clear to me whether you must use an Access database or if you are asking if there is an alternative database that can be used.

I have to use access database , I was asking if there is an alternative way( different open source library for instance) to write data from excel to access instead of system.oledb
 
I have to use access database , I was asking if there is an alternative way( different open source library for instance) to write data from excel to access instead of system.oledb
Have you never used odbc service to communicate via query with excel file? What is the correct connection string to use?
 

Latest posts

Back
Top Bottom