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

preview_player
Показать описание
How to: Insert New Records into a Database.

★★★Top Online Courses From ProgrammingKnowledge ★★★

★★★ Online Courses to learn ★★★

★★★ Follow ★★★

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!

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# - Could not Insert the data using VC# in MS Access
Add, save & retrieve data in SQL MS Access
insert data into SQL table from pre filled boxes in C# 4.0‎
Insert DateTime into SQL Server using C#‎
Searches related to c# insert data into sql MS Access
c# insert data into sql table
c# insert data into sql server MS Access
inserting data into sql table MS Access
insert query MS Access
sql insert statement from another table
Рекомендации по теме
Комментарии
Автор

Hours spend learning and you explained in minutes. Ay caramba . Thanks

alanbecerra
Автор

these videos are so helpful man thanks... im at uni and the idiots gave us the programming module half way through semester one and its due 2 weeks from know. All the resources don't show us what we need to do. Also we haven't even had time to finish off all learning weeks so out of 8 we have only done 3 and been told to do project...Your a life saver man!

Reaper_f
Автор

Thank you very much for your videos! I like that they are simplistic and to the point, and that you do a great job of explaining why you are doing each step. You make it very easy to create good working programs and still be a newb. Thank you!

robkriger
Автор

If you get confused using ", " + textObject, etc... you previously create a string var using string.Format with the way:

string preCmdText = String.Format(“insert into MyDB ([Name],  [Age]) values ({0}, {1})”, tboxName.Text, tboxAge.Text);
command.CommandText = preCmdText;

digimikeh
Автор

Excellent teacher, I'm learning a lot !!

mbs
Автор

For the insert into error, put "[ ]" between column names just as +Findle Fins has done!

pyrexo
Автор

Like many other users I got a SQL syntax error using the SQL syntax as shown ( "insert into EmployeeData(Firstname, Lastname, Pay]) values('" + txt_fname.Text + "', '" + txt_pword.Text + "', '" + txt_pay.Text + "')";).
Then I found Findle Fins's comment, and added square brackets, and now it works!
But why?
StakOverflow says that VisuaStudio needs square brackets
and indeed it works.
I still can't understand why the orignal version without brackets. Maybe he was using an older VisuaStudio version with a different behaviour.

salvinorandazzo
Автор

Thank you for this sir!, i understand you best than my professors T^T

erocsorez
Автор

I got errror into system.data.oledbexception : syntax error into statement

ashishbhadani
Автор

Can you use if statements to check if correct length values where inputted into the textboxes then display a message if not?

AmahleBoyce
Автор

Hi ProgrammingKnowledge , How can I add more some data to a database? I tried to add 2 more Textboxt such as Address and age but I cannot make it. It shows an error once I hit the "SAVE DATA" button. Can you help me fix it? Is there somebody can help me there?

thorramosjr
Автор

Good Job you have taken so much effort.

vinaynaik
Автор

Hello, i tried to insert into an exclusively locked access database. And i always getting an error
Is there any special command-text for the exclusively locked access database?

abuodai
Автор

I found this video to most helpful. I know have a better understanding for how Visual Studio works and inserting other data to it.

Brenda
Автор

Hello,
The tutorial is very good! What  i have to change if i want to fill up a text box with date like birthdate? Can you make a tutorial video about it? Thx!

zoyi
Автор

data saved but not record into database..
how to fix that?

hikariamari
Автор

What if do you have multiple tables? I need to manage more than 1 Access table, how can I switch between them? Do I need a different form for every table, right?

SoulDevil
Автор

Thx for the tutorial :)
But I got a Problem: How can i show a checked Checkbox into the MS Access database?

All the textboxes, Dates and even combobox values can be saved.... but not the checked state of a Checkbox.
Any suggests?

BankaiCorp
Автор

it's working perfect, but how can i set that i can display a messagebox when i try to add a person who is already added so i won't get persons double? thank you very much!

djlurano
Автор

In my case i have a ton of text boxes & combo boxes that i need to do this on multiple lines which creates a problem when you are using concatenation.

stanleyoverby