You are my time saver, thank you, I got stuck for more than 5 hours doing that based on the guide of the institute in the final project. Thanks a million!!!
I wanted to ask, what if my primary keys are set to auto increment and I'm using insert method, do I need to insert keys manually or I skip the column?
Your video is really awesome. its all in one and helps me a lot. thanks for uploading this helpful tutorials. one thing is if you include different types of control it would be more batter. after all one of the best.
its a great video really simple thank you, would you be able to upload the validation for not successfully updated because ID is primary key and primary can't be updated.
Thank you very much. I have been searching for a video concerning this topic and I just found it and It's really simple and easy to understand. Thank you alot
You missed the part about how to run SQL server to begin with, and if someone is looking for CRUD, he is probably newbie and it is a hell of a job to configure the server with visual studio.
Thanks for the great tutorial. I am having Problem with cmd.ExecuteNonQuerry, someone please help. .. when i remove ExecuteNonQuerry , then it shows it has been inserted but actually in table there is no data updated.
why mine is so complicated, in order to create a table I need to manually code it but you can casually just add table in there :O I'm using microsoft sql server and if it doesn't open my visual studio database won't connect
After click on the create new sql server giving the server name and new database name It is showing like create Database permission denied in database 'master'
Problem with cmd.ExecuteNonQuerry, someone please help. .. when i remove ExecuteNonQuerry , then it shows it has been inserted but actually in table there is no data updated
@@chaithravasista1622 But error handling should still be there or the program would crash if someone accidentally entered the wrong value. He would want something quick and easy like so... try { cmd.Parameters.AddWithValue("@ID", int.Parse(textBox1.Text)); } catch (FormatException) { MessageBox.Show("Please enter a whole number."); } catch (OverflowException) { MessageBox.Show("The number is too big."); }
Press View -> SQL Server Object Explorer. In SQL Server part you will see you local server. Select this part and press F2 to select the name. Mine is "(localdb)\MSSQLLocalDB". Enter this name in add connection form and now it would be working.
I am trying to follow your code step-by-step. I keep getting an error when I run it. the con.Open(); is what's causing the error. Any pointers? Thanks!
In the video at 09:29, there is a small issue with the SQL update method. If there are multiple rows of data, all of the data may be updated. ``` SqlCommand cmd = new SqlCommand("Update StudentInformation set Name=@name, Age=@age, Coures=@coures WHERE id = " + textboxId.Text , conn); ``` I added WHERE. hope it can help you😃
when I run the code it said that "System.Data.SqlClient.SqlException: 'Incorrect syntax near the keyword 'Table'.'" in line with cmd.ExecuteNonQuery();