How to connect to database with Visual Studio 2017 in C#? - c#

I'm currently using Visual Studio Community2017, and I created a Windows Form, but I'm having a problem when I come to connecting my Windows Form to a Database.
I was using Visual Studio 2013 before, and I remember that to connect to a SQL Database, I just had to install an extension to my project, and then I could use the library of MySQL.
But in the 2017, I can't find the same thing.
I tried to follow the instructions of the .NET tutorial on Microsoft's website, but didn't manage to make it work properly, I didn't understand all the steps.
Can anyone help me ? Thanks a lot :)
I already used MySQL with PHPMyAdmin with Eclipse.

Related

Using a mdf file from SQL Server 2019 in a Visual Studio 2019 C# application

I've attached .mdf files to Visual Basic applications plenty of times. I'm not 100% new to C#, I know some about it. I also know that attaching a .mdf is similar enough. I ran into this during my senior project, see below.
I just got SQL Server 2019 yesterday, and my Visual Studio (Community edition) is updated to the most recent patch as well. Side note: I just made a few tables with some example data in them to see if I could get it to work. Any advice on what to do?
EDIT: While looking through my visual studio installations, it seems I have localdb 2016... no options for 2019. So my question now evolves to:
How can I get Visual Studio to use a 2019 version of LocalDB?

How to add local database file to Visual Studio Mac 2017

I'm creating a hotel management service in C# on Visual Studio (Mac) and I can't seem to find a good explanation on how to add a local database file to my project. I created my database table in open office (.odb file) but there doesn't seem to be a way for me to implement this in my project. The documentation has nothing on this either. Any one got a clue how to add databases to a Mac Visual studio project?
there are no localDB in visual studio for mac, you need to install the docker image for sql server.
here is the link
You can run SQL Server on a Mac now:
https://database.guide/how-to-install-sql-server-on-a-mac/
Using Docker it can be made as your localhost SQL Server. I've done this and it works. SQL Management studio for Mac is useful too.
Hope this helps someone.
Consider using sqlite instead
Microsoft RazorPagesMovie tutorial using sqlite instead of localdb in Visual Studio 2019 for Mac:
Follow Tutorial: Get started with Razor Pages in ASP.NET Core
And the second part: Add a model to a Razor Pages app in ASP.NET Core

IntelliSense don't work - LinQ - Visual studio 2012

I have a problem with IntelliSense, it never work on my computer. I have already search on the web and try some manipulations :
I already check in tools-options-text editor and yes IntelliSense is activated.
I reinstalled visual studio 2012 too but it still don't work.
I add "System.Data.Linq" and "System.Data.Entity" too.
Visual studio suggest me : "caption/tfoot/tbody/..." may be I need to change because I don't want HTML suggest but SQL suggest.
I am on Windows seven professional, working with visual studio 2012 and Microsoft SQL Server 2014. Everything is working between Miscrosft SQL server and Visual studio, I just don't have IntelliSense...
Thanks you
I don't want HTML suggest but SQL suggest.
It is unclear what you seek exactly in intellisense, but VS intellisense is limited. You may want to look into off the shelf (third party addins) for intellisense to do work in SQL Server Studio instead.
Regardless in Visual Studio make sure you have these options in Options->Text Editor->SQL Server Tools to your liking:
A colleague solve my problem. He has just installed ".NET Web Development and Tools Blog" from here : http://blogs.msdn.com/b/webdev/archive/2013/11/18/announcing-release-of-asp-net-and-web-tools-2013-1-for-visual-studio-2012.aspx.
Now the text is formating and colored, everything is working !

Microsoft.VisualBasic.Powerpacks.ShapeContainer not found

I am developing a game in C# and it works properly here in my laptop. But when I tried to run it in other pc's its getting an error "Microsoft.VisualBasic.Powerpacks.ShapeContainer could not be found". I used Visual Studio 2008 and the pc's I have tried running also uses Visual Studio 2008.
Does anyone knows how to solve this error?
Will removing the lines, panels I have used in the forms helps?
You should download and install Microsoft Visual Basic Power Packs 3.0.

Dynamic Graph Creation using c# and VS 2010

My website needs to generate dynamic graphs. Im writting it in c# using Visual Studio 2010. I have searched the MSDN site and have found the asp:chart tag. The problem is It only seems to have a VS 2008 installer which dosnt work on VS 2010. Does anyone know a way of setting this up and running in VS 2010 or suggest a reliable graph tool?e
I have installed The Chart library
but have been unabel to install the VS add on because its for 2008
Add On
and I have been unable to find a 2010 link?
Also I getting data visulisation underlined in red on:
using System.Web.UI.DataVisualization.Charting;

Categories