question

RandallDonaldson-5605 avatar image
0 Votes"
RandallDonaldson-5605 asked ·

.Net problem/Question

I haven't programmed in .Net, last used VB 6 several years ago. I'm trying to make a Windows Form application in VB.Net, and it won't let me use the "Add New Data Source" option to connect my database to the project. When I click "Add New Data Source" nothing at all is happening, that I can see. It's not launching a wizard. Data Sources tab still says "There are no data sources to show for the selected project." I've tried several tutorials online and none of them seem to be having this issue.

dotnet-visual-basic
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

karenpayneoregon avatar image
0 Votes"
karenpayneoregon answered ·

Have not seen what you have shown. If by chance this is a .NET Core VB.NET project this functionality is not supported while using conventional .NET Framework this is supported.

Try the following if not using VB.NET with .NET Core

  • Opening the server explorer tab

  • Create a connection to a database

  • Now try adding a data source to your project

If that does not work, click on the feedback button in Visual Studio then click "Report a problem" (you need to be sign in to Visual Studio to do this)

[1]: /answers/storage/attachments/82536-f1.png







f1.png (4.5 KiB)
· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

That was it! Thanks. Somehow I must have been choosing a Core project as my base template instead of a Framework template. Didn't have things like that back in VB 6, you were just creating a VB project.

0 Votes 0 ·
Viorel-1 avatar image
0 Votes"
Viorel-1 answered ·

Try selecting the project in Solution Explorer before executing “Add New Data Source…”.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RandallDonaldson-5605 avatar image
0 Votes"
RandallDonaldson-5605 answered ·

Yeah, I tried that. That changed it from telling me "This window is not supported for the selected project" to saying "there are no data sources to show for the selected project." So now, there are no data sources (as expected), and I go to "Project>Add New Data Source" and all it does is change my focus back to the Data Sources tab. But all of the buttons at the top of the Data Sources tab are disabled.

82419-untitled1.png



untitled1.png (4.9 KiB)
·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

XingyuZhao-MSFT avatar image
0 Votes"
XingyuZhao-MSFT answered ·

Hi @RandallDonaldson-5605 ,
It seems that you didn't select any project.
82577-1.png
After creating a windows form project, you need to select it.
82528-2.png
Hope it could be helpful.
Besides, if I have any misunderstanding, please provide more details here.

Best Regards,
Xingyu Zhao


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



1.png (73.5 KiB)
2.png (19.9 KiB)
·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.