27 Replies
i keep getting this error... ive never done anything with databases before. this is my first time. Help will be very much apreciated. Im also quite new to C#
could paste the method here?
$code
To post C# code type the following:
```cs
// code here
```
Get an example by typing
$codegif
in chat
For longer snippets, use: https://paste.mod.gg/ConnectionStrings.com - Forgot that connection string? Get it here!
All connection strings in one place. Find the syntax for your database connection using ADO.NET, ADO, ODBC, OLEDB, C#, VB, VB.NET, ASP.NET and more.
Check if your connection string is valid
in fact i wanted to see the ending of it
there you go
ive asked chat gpt about the error im getting and it says i need to install the drivers. but ive installeld the drivers. ive even tried reinstalling them. and on top of that its asked me to go through HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\16.0\Common\InstalledPackages\AccessDatabaseEngine_X64
and i dont get the last 2 parts to it when i follow the path
MS Access is shit of a database, but not so shit to require you to fiddle with the registry
Ah
SqlConnection
is used with SQL Server
Not with Access
You want... something else, dunno what. Something from the OleDB family I'd bet?ive changed that earlier tho to OleDbConnection
but the error im getting is
System.InvalidOperationException: 'The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.'
That
12.0
will change depending on the version of MS Access you have installedyh i didnt think that i would've needed to do that but i cant follow the path all the way since the last two bits are missing
i installed the one from the MS 365 thing
so i need to download the 2007 version?
or just change the ACE part
not sure which one i need tho
Change the ACE
how would i do that? and what to?
You would edit your code
Where it says
12
you would put 13
would become
What to? Idk
Try incrementing it by one until, dunno, 25 or so and see if any of those works
Or try to look up what version is needed for your version of Access
Or start using a real database instead of Access yh ill see if i can find that
i cant... i have to use access for my project sadly
My condolences
hahaha
what databases should i use in the future tho?
Postgres
Or SQLite if you want something small and file-based
this is what my version is i believe
but tha tcant be because there are multiple versions betweeen those years
that might be better?
Maybe?
Never worked with Access, so it'll take trial and error
nws
dont mind how long it takes to figure out
just as long as i can get it sorted
there should be a command to list (in an easy way) the installed drivers, for not shooting in the dark too much