hi
Can u help me to put my microsoft access data base into visual studio ? Please 😦
28 Replies
What exactly do you mean by that? Do you wish to use the database from inside a C# program, or just view it inside VS?
I have to do a project for beginners in c# and the teacher told us to use microsoft access and when I put my database from access in visual studio it keeps giving me an error and I don't know what to do
Well, I don't know what you are trying to do and...
when I put my database from access in visual studiodoesn't tell me much. Access is an absolutely terrible choice of database for a beginner thou, as modern C# doesnt support it very well the old legacy .NET Framework versions handle it great, but those are out of date since 2016 and should not be used or learnt
VisualC#.Net allows you several ways to connect to a database or data source this
yea.... but I can not do anything about it
ok so just to clarify, this is a .NET Framework project, and you are trying to connect to an access database from inside your program, not VS itself?
yes
in windows forms app (net.framework)
okay.
what file ending is your database file?
.accdb
or .mdb
?accdb
Try following these instructions: https://learn.microsoft.com/en-us/visualstudio/data-tools/connect-to-data-in-an-access-database-windows-forms?view=vs-2022
yea i use this and still give me this error
¯\_(ツ)_/¯
I can't help further I'm afraid
Access database hasnt been relevant for ~15 years at this point, and .NET framework itself hasnt been relevant for 8+ years.
thank you very much anyway there is no student without arrears.....
Thats an error message about the SQL Server library. Which has nothing to do with Access. So no idea what you're trying to do there.
if I give you my base from access, can you please put it in visual studio and send it to me?
No.
oky
I'd imagine the error comes from VS "add data source" wizard trying to access the sql client library before it even checks what database type you are trying to add
I have never used the VS data sources thing, prefering to keep that stuff in my codebase myself
ok i'm fried
I have to do something like that and I don't even have the basics
tell your teacher
say "hey, I cant get the database to work with visual studio, it gives me these errors"
my teacher is 60 years old, I don't go to her anymore so ...
Im not saying your teacher is likely to fix it, but they need to know if you are unable to complete the assignment because of errors outside of your responsibility
alternatively, fuck access, use a modern database and make the project anyways?
Thank you for your support 🙂
First, don't mix terminology.
You're not trying to connect Access to Visual Studio, you are trying to access MS Access database in
accdb
format from your Windows Forms C# project.
Second, I'm not sure where you got the idea to use Microsoft.Data.SqlClient
, but that isn't going to work.
As already stated, MS Access is old tech, which means you got to use "old tech" methods to work with it.
Specifically, you should be using OLE DB provider.
You'll have to figure out the correct connection string specific to accdb
database format.
For reference, there are 2 MS Access database formats:
- mdb
- which is the old format
- accdb
- the new file format which is used today
Did you properly follow all the steps explained here?
https://learn.microsoft.com/en-us/visualstudio/data-tools/connect-to-data-in-an-access-database-windows-forms?view=vs-2022
As far as I can tell, it seems like they show everything you need to do to connect to your database.I solve this part
Now... I try to make a project
But is not working like i want
I guess c# is not 4 me
seems like an odd takeaway
you are by your own admission very new to this
if it worked exactly as you wanted on your first attempt in only a few hours, I'd be amazed
True
But I'm running out of time and I'm agitated