Insert,Delete and Update data in database from datagridview in c sharp
Vložit
- čas přidán 20. 05. 2014
- These tutorials teach how to insert data's in SQL server using windows forms. This tutorial helps to insert, delete & update data's through grid-view to the database in a step by step with very basic and easy steps.
Email: nembooli@gmail.com
I was trying to do this for 3 weeks and finally i did it. I am so HAPPY. THANKS.
Worked perfectly with MySQL server. Thanks for your kindness
Dear Vetrivel it works fine..
It is really agood piece of work of you. Many thanks.
this makes the things easier for a programmer to play with SQL
I am from Sri Lanka. Your videos are very easy to understand. They are very helpful me while doing my assignments. Thank you so much.
Thanks a lot. Your video saved me. Simple and efficient database update via datagridview.
your code is very easy to get it! Thanks! I am a big fan of your work!
MAAAAN you're awesome! From Russia with respect
Great video ! Thanks for help !
I find the code tremendous value. Makes me remember the amber screen days and other techniques.
Thanks man. Keep it up. Subbed!
thanks, it really help us for our thesis project :))
muchas gracias. he aprendido mucho con el material que has subido
thank you....
i wants more videos like these....
In Really Dear Sir Ur methodology is so best thanks
I am From Afghanistan
I am from rwanda.your video is very helpful
It is well explained ,eazy to understand video ,I love it alot and it was very helpfull.
It's useful ! Thanks.
Thanks for this!
thanks dear as a beginner this video helped me a lot.
Thanks, Good Man!
Thank you bro!!
Thanks u so much friend.
:)
(y)
really useful.
Thanks.
Thank you! works perfectly.
I realize it's kinda off topic but does anyone know a good place to watch new movies online ?
@Koda Joaquin Try FlixZone. You can find it by googling =)
@Callen Byron Yea, been watching on FlixZone for years myself =)
@Callen Byron Thank you, I signed up and it seems like a nice service :D Appreciate it!
@Koda Joaquin no problem xD
Very helpful indeed
I can't find this table. Could you help me? I use Windows 10 and Visual Studio 2017 and 2019
Tremendous Sir
where is the INSERT part mate?
Thanks a lot 😃😃
This type of program not working in Visual Studio 2015 with dynamic SQL. If Select statement have where then it is not working. If you have solution then please provide.
thank you very match
10/10 good one.
This getting error
object reference not set
(DT)
thank you
Sir if I want to put a delete button and i want to delete using that button then how can we do that ?
in gridview it not showing me enable adding,deleting,editing why i so can u tell me
Hi!
Please how can I get database from Google sheets?
I want to show it on gridview..
10/10 bro
I am Getting Error "System.InvalidOperationException : 'Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information'
+Vetrivel do U think with your video we can learn how to program?
Thanks
How do we create the parameter (i.e Select Cus code, Cus Name....) for SqlDataAdapter in Visual Studio 2013? When clicking new query from the table in Server Explorer, there is no option to add table
Amy Le duni
cara mengatasi duni
Hi, thankyou for your tutorial!
but where's the delete command?
In Button1_Click, I do a little adjustment, it works now
string conString = "Data Source=WIN-3HH0R1TE1AB;Initial Catalog=ExampleSQLDb;Integrated Security=True;Pooling=False";
SqlConnection con = new SqlConnection(conString);
con.Open();
SqlDataAdapter sda = new SqlDataAdapter("select * from Table1", con);
SqlCommandBuilder scb = new SqlCommandBuilder(sda);
DataTable dt = (DataTable)dataGridView1.DataSource;
sda.Update(dt);
thx!
You can do this query insted of yours (Select * from [table name])
Nice Tutorial can u show me how to delete records....
I got it working. Thanks a lot. but when I reload my table. I get something like this:
1 name1
2 name 2
30
It keeps doing that. and doesn't start with 3
thank u show much it helped me a lot............can u help me to add on delete button to delete the record from datagridview
can this code work using wpf ?
Can you helpme, insret buton, in form iclude datagridview and textbox (show infomation for each column in datagridview). Thanks
+minh hai Nguyen welcome laptrinhvb.net
I followed same instructions, but I can not delete any record, my application throws exception: "Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information." when I try to "Update" after deleting a row. Is this due some setting in the Database or Table?
hi me too get same error Dynamic SQL generation how to rectify this error anyone share and fix this.... i am using SQL server 2008
I'm finding it to connect to my database. may anyone please help me
i have a problem on
scb =new SqlCommandBuilder(sda);
sda.Update(dt);
so what can i do?
on button update record
how can i display messagebox when one of rows is null? i want to make exception for that situation, please help. BTW thiw video saved my project, thank you
where's the deleting?
from 4:50 I cant do insert query or anything,...help
hello sir there is a problem when in i type the same code in the visual studio 215 i got an error during updating the gridview data how to handle this
the error is
Dynamic sql generation for the update command is not supported against a selectcommand that does not return any key column information
Hello Muhammad i have same problem this program doesn't work in Visual Studio 2015. If you found any solution then please let me know.
It means when you did your SELECT statement in your sqlAdapter you didn't include the Primary Key from the table you were querying
I have no option for new query
Харош чел
how to close the datagridview or how to reset it
What kind of language is that???
Uros Gorensek Thanks Brother.. Further Any Doubts then feel free to ask me.. if you like our tutorials then kindly share your friends..
+Uros Gorensek Hey do not see the language that he is speaking. Learn the stuff that he is teaching you free of cost !!
if u want to learn in good language than join the institutes
c#
C# bro
visual studio c# mea ContextMenuStrip mea radiobutton mea TopMost ko control karne ka treak kea hai
it is very interesting tutorial .please help me if you have any tutorial or source code about plagiarism testing system
{"Object reference not set to an instance of an object."} getting this problem sir
Sir it's not working all code is ok but don't know why data is not updating in database :/
It would be nice if you provide a link to your source code
Regis Maltais Thanks Brother.. Further Any Doubts then feel free to ask me.. if you like our tutorials then kindly share your friends..
Sir I tried this process but it doesn't getting updated..reason sir
it seems like the database is not updated
sir it's not working on my system. error is:{"Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information."}
i selected table by where condition .
string sql = "select item,Qty,Price,Total_price,work_status,Bill_No from item_dtls_tab where Bill_No='" + comboBox1.Text + "'";
da = new SqlDataAdapter(sql, cn);
First Work on the example given in the video. Then try your ownpaying attention to the syntax. These videos are for help in understanding.Take your time to patiently work through.
your table doesn't have any primary key. Add a primary key in your table and your error will resolve.
hi my freínds great work could you please share the code ?
the subs at 0:40 tho...
Can you provide a link to your source code
I have no idea wtf you're saying.
you dont have to. He shows everything what he is doing. Don't act an idiot.
why am i always getting problems with these
errror on
sda.update(dt);
plz help
dalvir singh i have the same problem. appears to be null exception. how to fix?
you might have used "Select * from [table_name]"
use column names like "Select name,age,phone from [table_name]"
that will do i hope !
visual studio c# mea ContextMenuStrip mea radiobutton mea TopMost ko control karne ka treak
links video databas ples
Where is delete?
WHERE DELETE ?? THANKS
not working
can you give kod? plaseeeeee
Dude get your mic sorted out, and speak more loudly and articulate PLEASE!!!
why programers never put the f*cking code downloadable or in the description, what they are expecting? +Vetrivel D it's an advise.
+ichide7 Thanks for your Feedback. I Will make one blog and i will give that links..
Please Ask any Doubts i will make video for that..!
+Vetrivel D hi,it just have an update and fetch data,where is Delete command ?
+Vetrivel D Do you have Entity Framework example ? And with 2 or more ways how to bind to grid.
I hate when people want to learn to do something but are too lazy to type the code themselves. There's barely any code to type. The creator of this video doesn't expect anything. Programmers don't really hold people by the hands and just give you everything. Seriously, you actually learn better when you type code. Any teacher will tell you that.
Excelent.
where is insert and delete code ? time waste
wasting of time.
y?
Rubbish
Hi!
Please how can I get database from Google sheets?
I want to show it on gridview..