r/visualbasic • • Nov 26 '20

Super simple help needed please!

Hey guys, I'm sure this is SUPER basic and simple but I've been literally tearing out my hair over this!!

So I've created an SQL DB within the project, I can see it under the solution explorer, now in the form designer I want to add DataGridView so I can display info from the DB.
But when I click on choose data source, my database isn't displayed?!

I can also see the database under data connections (.mdf file)

Any idea what I'm doing wrong??

I'm trying to create a super simple little app for viewing and editing info from a simple DB but I cant even get this to work!

Thanks in advance ya'll! apologies again for n00b question

5 Upvotes

8 comments sorted by

1

u/pathfinderNJ Nov 26 '20

Did you add it as a data source to your project? The add data source wizard can walk you through it

1

u/TheStrange420 Nov 26 '20

So if I go to the data sources window, it says This window is not support for the selected project. I have no idea why!! thanks for response!!!!

1

u/pathfinderNJ Nov 30 '20

What version of visual studio is it?

1

u/TheStrange420 Dec 01 '20

Latest version, community edition

1

u/pathfinderNJ Dec 01 '20

Ahh- are you using .NET framework or core? This method only works on Framework.. You have to manually create the connection in code in CORE

1

u/TheStrange420 Dec 01 '20

Pretty sure it's the. Net framework, chose it from the template at the start. Is it possible to manually create the connection in code regardless? Might just have to use that, any ideas how that's achieved?thank you so much for all your help BTW!!