In This tutorial we will learn how to connect sql server with windows application
|
Here we will learn how to create a login form with Sql Server
|
In This tutorial we will learn how we do password protection using code.
|
Here we will learn how to use of Group Box and Picture Box in window form.
|
In This tutorial we will learn how to open second from using first form in window form
|
Here we will learn how Insert data into dataBase in window form application
|
In This tutorial we will learn how Edit and Update data from database in window form.
|
Here we will learn how to Delete data from database in window form
|
In This tutorial we will learn how to Use of comboBox in windows form
|
Here we will learn how to Link combobox with database
|
In This tutorial we will learn Database values in textbox if select Combobox in window form
|
Here we will learn how to Link list box with DataBase in window form
|
In This tutorial we will learn Database value in textBox if selected in listbox in window form
|
Here we will learn how to Show database value in DataGridView in window application
|
In This tutorial we will learn How to use chart graph in window appliaction
|
Here we will learn How to link chart Graph with database in window form
|
In This tutorial we will learn How to Dynamically display Current date and time in window form
|
Here we will learn How to use progressBar and button in window appliaction
|
In This tutorial we will learn How to Exit from this application
|
Here we will learn How to Change column title of datagridview
|
In This tutorial we will learn How to Display selected Row from datagrid view to textBoxes in windows application
|
Here we will learn How to use CheckBox and redio Button in window form
|
In This tutorial we will learn How to How to use DateTime Picker and save in databas in windows application
|
Here we will learn How to use OpenFile Dialog and Copy that path
|
In This tutorial we will learn How to Open File Text into TextBox and Rich TextBox
|
Here we will learn How to Search_Highlight text in TextBox or richTextBox
|
In This tutorial we will learn How to Create a Text File and write in it in window application
|
Here we will learn How to Create Excel(.XLS and .XLSX) file from C# using excellibrary in windows application
|
In This tutorial we will learn How to export data from database to Excel file
|
Here we will learn How to import Excel File to DataGridView
|
In This tutorial we will learn How to Open and show a PDF file inside the form
|
Here we will learn How to launch any (_exe) file in any directory
|
In This tutorial we will learn to Make application to beep and How to add a delay in second
|
Here we will learn How to play a audio file in window application
|
In This tutorial we will learn how to Generat Random Number within range
|
Here we will learn How to use and connect Sqlite in a window application
|
In This tutorial we will learn How to add a (window media palyer) video clip to the form
|
Here we will learn How to create MP3 media Player in window application
|
In This tutorial we will learn How to load image in picture Box from computer
|
In This tutorial we will learn How to Retrieving Image from database in window application
|
Tuesday, 8 April 2014
Window Form/Window application Tutorial
SQL server database connection in Window Form
Next
I will start first Tutorial with SQL server database connection. Here i will explain step by step. follow these steps.
step (1):- create a window form
Open visual stdio and create a new project and select window form application and give it name as First_Csharp app.
step (2):- Drag and down a button
now from tool box drag and down a button and click on button
step (3):-Database table
create a database table in sql server. here database name is windowapp and tablename is data
step (4):-Coding on button click
first insert a namespace "using System.Data.SqlClient".
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace First_Csharp_app
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
try
{
String str = "server=MUNESH-PC;database=windowapp;UID=sa;password=123";
String query = "select * from data";
SqlConnection con = new SqlConnection(str);
SqlCommand cmd = new SqlCommand(query, con);
con.Open();
DataSet ds = new DataSet();
MessageBox.Show("connect with sql server");
con.Close();
}
catch (Exception es)
{
MessageBox.Show(es.Message);
}
}
}
}
step (5):-Run the application
Subscribe to:
Posts (Atom)
C# program Selection Sorting
Selection sort is a straightforward sorting algorithm. This algorithm search for the smallest number in the elements array and then swap i...