C# Tutorial 6: Insert/Save data to database

C# Tutorial 6: Insert/Save data to database


How to: Insert New Records into a Database
Database Access with Visual C#.NET
sql server - Insert Data into database in C#
How to insert Data to Ms SQL server 2008 using C#.net
.net - C# insert data into SQL table
Using Visual C# and SQL cannot insert data into table..‎
c# import data from text file into sql databse line by line‎
store xml in SQL Server 2008 from C#
Using SQL in C# - Cannot insert data into SQL table
visual C# - Could not Insert the data using VC# in MYSQl
Add, save & retrieve data in SQL
insert data in sql 2005 from excel file through c# asp.net‎
insert data into SQL table from pre filled boxes in C# 4.0‎
insert into database unsing ado.net and C#
Insert DateTime into SQL Server using C#
Searches related to c# insert data into sql
c# insert data into sql table
c# insert data into sql server
inserting data into sql table
insert query
sql insert statement from another table
Closed Caption:

hello guys welcome once again till now
we have seen how to make a logging
application with your C sharp and mysql
database and how great a new form when
you log in and how to open a new form
so when you open a new form
I just want to be able to save the
doctor for the employee
so in this video we will learn how to
see the data from you see some sharp
application to the mysql database
so for example if you open the mysql
database i have the doctor base or
database and i have a table called
employee ID and in that I have the
columns like employee ID name so name
age and I want to end the new not into
this database with the help of my C
sharp application
so how can i do that i will show you
right now
so first of all if you're following this
video till last video
this one was empty i have added for
labels from my toolbox so drag these
kinds of labels and just change the text
for these labels from here
this text just change it
and I would eat this so this is the four
levels i have taken and i have taken the
for text boxes from my toolbox
so does drag and drop for the xboxes and
places please them like this and take a
button from your balls and plate it like
this and change the text as see now for
the the text boxes i have changed the
name of these text boxes
so let's see if you go to the top and go
to the name
I change the name of the first text box
as c ID and the score text
this will indicate the employee ID text
xbox variable name
so this is the name of your body text
box where the email between you will use
in the code in the same way for the
first time I have provided for the first
team to Los text box sorry for the first
name
xbox I provided the name name underscore
text or the last name I provided the
name surname on the school text and all
the age
xbox I have provided the name age and
the school next txt
ok so just
change the name according to your
convenience and just remember those
names and now when you are done with
this
assembly then just select the same
button and double click it and you will
go to the court of that button click
event so on the top of your fall just
wherever you're using system windows .
form these utilities are there you need
to declare once again because this is a
new form last time in the first formal
so we are picking at this using my SQL .
. .
- well lined so just declare this and
once again go to the button double click
it and this is the code for saving the
new doctor in the database so we quickly
run to the board declared strength
called on string and just pass these
connections which I already told you in
the last videos so you have to write
data source is equal to localhost your
old number and then semicolon board is
equal to 3 30 6 some people knew the
name is equal to root them equal in the
password is equal to
ok and now we will declare a second
variable strength for ready so in this
variable string we will pass our core
ready for inserting the doctor
so if you know the my squirrels wedding
you know how to insert the data in the
database my credit in my school
so just right first of all these double
quotes and in the double quotes right
insert into the database . e data
so this is my database name and this is
my table name like a bee starts a doctor
in the bracket the columns in which you
need to insert your daughter so I want
to insert data into employee ID needs so
name and each column these four column I
want to insert a doctor and so just in
the blanket right employee ID common
names , sony , age and then you have a
space and then right
well use and make a bracket here
brake it and gave a single chord and
double coat and this plus sign and then
write this . see ID and the score text
if you remember i have named my this
text box name as c ID text so this
naughty ID text . text plus
double quote and single quotes this is
one variable we are passing from the
text box of employee ID , single boat
same as that single vote in double
quotes and plus and in between pass this
. name . next
so this name text is equal is the second
xbox name
ok and then right , single code that we
put plus this . so named text which is
your surname text box name . text plus
court and just complete the port , once
again single quote double quote plus
this time we are going to pass it for
this . each text box name . text and
plus and we put single for ten
this is the bracket for the value so
close it
give this semi colon and then give this
double court to complete the text and
this is the code for the string
completion
so write this ok so this is the quality
to insert the data into the database so
we have provided in sequence employee ID
name surname and age xboxes data into
our this column employee ID name surname
in sequence so one pastas employee ID
here it is also completely taken his
name here is also name and surname is
also name and age and here we'll also H
then in the third land right is great
connection on dr. mrs. the mice
connection database name connection name
sorry is equal to Nu my screen
connection and just put this on string
here then write my script command CMD
database
this is my variable name is equal to Nu
my school command and I will pass this
credit here , on database this one
I'll pass it here and then we will
declare a myschool dr. reader variables
so right my school dr. reader my reader
and then we will make a try catch block
so if some exceptions are there in the
connection then it will catch the error
so right
try bracket and your bracket Claus get
exception ex and in the bracket of catch
right message . show TX . message which
is this expert message and in here in
the try block write this code so copy or
this myspace c'mon variable . open
record and record closed then copy this
my SQL data reader variable is equal to
demand that our base variable
this one copy this not execute reader
and if the data is successfully inserted
into the database then we will show
message . show not i saved so this is
just to confirm that our that is really
saved and make a while and in the
bracket pride my reader . lead
so this one is this variable . read
second bracket close and just leave you
while you empty
this is doing nothing ok so this is the
code for you're saving the doctor into
the documents and now when I run my
program this is the longer claim so i
will just
go to the second phone and in here
before that we will see the doctor in
the doctor - hello
I have nine employee IDs in my documents
i will and the tent employee id's
replaced this no more employees is
present so we add a tent employee then
his name is ma
last name and his ages looking for
example and when I pressed the same
button you see my the message comes at .
is saved and click ok and i will go to
check in my database if the if the
doctor is really inserted into the
database so i will refresh my daughter
and you can see new . eyes saved into my
database by using C sharp application
so in this way you can save the data
into the database
I hope you have enjoyed this video
please rate comment and subscribe and by
now

Video Length: 13:48
Uploaded By: ProgrammingKnowledge
View Count: 229,941

Related Software Products
VISUAL C# 2005 AND DATABASES
VISUAL C# 2005 AND DATABASES

Published By:
KIDware

Description:
VISUAL C# 2005 AND DATABASES is a tutorial that provides a detailed introduction to using Visual C# for accessing and maintaining databases for desktop applications. Topics covered include: database structure, database design, Visual C# 2005 project building, ADO .NET data objects (connection, data adapter, command, data table), data bound controls, proper interface design, structured query language (SQL), and database reports. Actual projects developed include a sales invoice system, a home ...


Related Videos
Connect to MySQL Database - Use Select, Insert, Update - C# C Sharp Visual Studio 2010
Connect to MySQL Database - Use Select, Insert, Update - C# C Sharp Visual Studio 2010

In this tutorial I show you how to connect to a mySQL database using C# and Visual Studio 2010. I also show you a few useful queries you can run: Select, Insert, and Update in order to use the data in the mySQL database. WEBSITE: http://www.Quack-Ware.com FORUMS http://www.Quack-Ware.com/forums/ FREE CODE SNIPPETS http://www.freecodesnippets.com hr / bClosed Caption:/b hey guys i got a few requests to ...
Video Length: 08:01
Uploaded By: QuackWare
View Count: 329,902

C# MS Access Database Tutorial 2 # Create Login Form with Microsoft  Access Database
C# MS Access Database Tutorial 2 # Create Login Form with Microsoft Access Database

Login Program for C# with MS Access Database Access Login Database - Microsoft Access How To Make A MS Access Login Form How to create login form in Microsoft Access 2010, 2007 Visual C# - Login Form Tutorial Microsoft Access c# - How can I close a login form and show the main form Login Form using C# and SQL Microsoft Access C# Login Form with MS Access Login Form using c# and ms access as database..?‎ closing Login form after a successful ...
Video Length: 24:20
Uploaded By: ProgrammingKnowledge
View Count: 95,174

Form Login Visual C# Connect to a Database  SQL Server Part 1
Form Login Visual C# Connect to a Database SQL Server Part 1

Connecting to a SQL Server Express Database with C# .NET Login With Combobox
Video Length: 09:13
Uploaded By: Truong Quoc Tuan
View Count: 74,135

C# MS Access Database Tutorial 6 # Insert/Save data to database
C# MS Access Database Tutorial 6 # Insert/Save data to database

How to: Insert New Records into a Database Database Access with Visual C#.NET sql server - Insert Data into database in C# How to insert Data to Ms SQL server 2008 using C#.net .net - C# insert data into SQL table MS Access Using Visual C# and SQL cannot insert data into table..‎ c# import data from text file into sql databse line by line‎ store xml in SQL Server 2008 from C# MS Access Using SQL in C# - Cannot insert data into SQL table visual C# - ...
Video Length: 18:32
Uploaded By: ProgrammingKnowledge
View Count: 70,981

How to Connect to Database using C#.net sqlserver 2005
How to Connect to Database using C#.net sqlserver 2005

Using Visual Studio connect to database (sql server 2005)
Video Length: 13:04
Uploaded By: Targetj Solutions
View Count: 1,140

Copyright © 2025, Ivertech. All rights reserved.