C
C#•7mo ago
Paula

hi

Can u help me to put my microsoft access data base into visual studio ? Please 😦
28 Replies
Pobiega
Pobiega•7mo ago
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?
Paula
PaulaOP•7mo ago
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
Pobiega
Pobiega•7mo ago
Well, I don't know what you are trying to do and...
when I put my database from access in visual studio
doesn'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
Paula
PaulaOP•7mo ago
VisualC#.Net allows you several ways to connect to a database or data source this yea.... but I can not do anything about it
Pobiega
Pobiega•7mo ago
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?
Paula
PaulaOP•7mo ago
yes in windows forms app (net.framework)
Pobiega
Pobiega•7mo ago
okay. what file ending is your database file? .accdb or .mdb?
Paula
PaulaOP•7mo ago
accdb
Paula
PaulaOP•7mo ago
yea i use this and still give me this error
Paula
PaulaOP•7mo ago
No description
Pobiega
Pobiega•7mo ago
¯\_(ツ)_/¯ 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.
Paula
PaulaOP•7mo ago
thank you very much anyway there is no student without arrears.....
wasabi
wasabi•7mo ago
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.
Paula
PaulaOP•7mo ago
if I give you my base from access, can you please put it in visual studio and send it to me?
wasabi
wasabi•7mo ago
No.
Paula
PaulaOP•7mo ago
oky
Pobiega
Pobiega•7mo ago
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
Paula
PaulaOP•7mo ago
ok i'm fried
Paula
PaulaOP•7mo ago
I have to do something like that and I don't even have the basics
Pobiega
Pobiega•7mo ago
tell your teacher say "hey, I cant get the database to work with visual studio, it gives me these errors"
Paula
PaulaOP•7mo ago
my teacher is 60 years old, I don't go to her anymore so ...
Pobiega
Pobiega•7mo ago
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?
Paula
PaulaOP•7mo ago
Thank you for your support 🙂
SuperBrain
SuperBrain•7mo ago
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.
Paula
PaulaOP•7mo ago
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
Pobiega
Pobiega•7mo ago
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
Paula
PaulaOP•7mo ago
True But I'm running out of time and I'm agitated
Want results from more Discord servers?
Add your server