Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello I am Beginner learning Vb.net. I have one project Library System.I want to connect data from Sql server 2008 to Visual Studio 2010 with data
gird view and I want to use Insert Update Delete by using button also, Can anyone help me?
Posted
Comments
Richard MacCutchan 7-Feb-15 6:23am    
Why have you tagged your question Linux?

1 solution

First thing is that you need to use the connecting string of your database that is present inside the SQL Server. Once that has been captured you can use that connection string while creating an SqlConnection[^] object instance so that the code would use that database for executing different command sets on it.

I have written an article[^] that describes a few aspects of connecting the SQL Server database to your .NET application, (sadly that was written in C#, you can convert the code from C# to your VB.NET code using Telerik converter[^]) and you will then be able to use the SqlCommand[^] object to execute different commands, like SELECT, INSERT INTO etc. The remaining stuff like GridView, and Button events are related to your framework and have nothing to do with SQL so that is why I will leave that upto you to check MSDN for these objects and their events (depending on your framework e.g. WPF or Win Forms etc).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900