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!!!
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
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
sir after i create the sql database and gonna save it , it doesn't save in in the sql, it directly pop up a msg as save to document.. what can i do for that ?
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.
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.
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.
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'
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😃
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.
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."); }
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!
when I run the code it said that "System.Data.SqlClient.SqlException: 'Incorrect syntax near the keyword 'Table'.'" in line with cmd.ExecuteNonQuery();
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!!!
thank you so much! I couldn't find how to do this in all over the internet.
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
very useful video thank you😊
Glad it was helpful! Please keep in touch!
thnk u very much.u r solve my problem.thnk u again and again.
You are most welcome.
Thanks a lot... It helped a lot
Glad it helped. Please keep connected!
Excellent tutorial. if its added image also than it would be more batter.
Awesome, just what I was looking for.
glad to see your comment. you are very kinf . please keep connected.
wow thanks for the clear expiation
Glad it was helpful! Please keep connected!!!
Thank You Very Much ,,We want more Tutorial like this.
Keep connected....
@@SwiftLearn what if i add Datagridveiw to the design and connect to database does that work ?
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
Good Job. Thanks from Germany!
awesome, thank you for the tutorial!!
You are very kind. Thanks for your comment. Please keep connected.
sir after i create the sql database and gonna save it , it doesn't save in in the sql, it directly pop up a msg as save to document.. what can i do for that ?
Awesome, helped a lot
Glad it helped!
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.
U right
I'm having this issue now. And I have no idea how to get around it.
@@kenballard2039 which problem facing?
Not that hard
Much respect from me💪!
thanks for this comment. you are really great. please keep connected.
@@SwiftLearn Thank you too, you're awesome!
Thank u bro awesome 💞🌹
Thank you too. Please keep connected.
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?
Yes, You should skip this column. It will be added incremental number automatically.
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.
You can create Unique Key instead of Primary Key to perform update operation.
2022:Thanks Love your contents very details from good man,keep it up bro
Getting error at cmd.executenonquery();
same :[ how to fix it ?
you have error at insert or update or delete query
Check your code using breakpoint... as you can check where error generated.
Thanks for ur coopreation dear
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.
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'
Create database and insert record. check it's OK or not.
Thank yo....so much bro..👍👌🏼👌🏼👌🏼. Helpful for me
Always welcome. keep connected
your are great man very easy and clear explanation thank you so much
Thanks a million
You are very kind. Thanks for your comment. Please keep connected.
Thank you very much for the tutorial
You are welcome! keep connected.
Thank you very match for this helpful tutorial. thank u enough my friend keep going.👍👍
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😃
Sure.
This is wholesome
Thanks man 🤍🤍
thank you so much it helps me a lot
exelente!!!!!!! MUITO OBRIGADA, salvou minha nota 🤩🙌
was very helpful.thank you♥♥♥
thank you so much👍👍
You are very kind. Keep in touch!
Thank you man!
Welcome. You are really kind.
Simply and easy. Thanks Sir
Most welcome
3:08 I don't have a Server Name to choose from, what should I do?
try with .\sqlexpress
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.
@@bloodflower thank you so much
Thank You. This video help me alot. I was finishing my task with this tutorial. Its simple and easy to understand
Thank You Very Much
Thanks for your comment. keep connected.
so helpful thanks~~
Glad it was helpful! you are great! Please keep connected.
superb, thanks
Great tutorial. great thing is define with annotation. Thanks.
Thanks for your comment.
if i want to change value of only name or age then what i should do ?
That what I want easy short understandable.
If you want to search for something else instead of everything in the database just swap the query with your research query
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
Executenonquery used to perform insert update and delete operation. Use executenonquery and debug. If you get any error message just reply
I am also having the same problem with cmd.ExecuteNonQuerry. Any help please?
mantap
do you have a toturial that can search IDnumber and it will display the picture of the student
Visit this tutorial ua-cam.com/video/fjftbYysTIE/v-deo.html
thanks a lot eng 😍
its a great video really simple thank you, would you be able to upload the code by any chance?
how to do crud in c# .mdf with one-to-many database?
hello, win the window (Create New SQL Server Database) is opened there is no thing in the list (Server Name). can you help please.
What if i dont want to hardcode DB connection string? I want user to input the DB name, user and password for db user. how do i do that?
in c#, put data from sql in one column ?
You're amazing, thanks.
I keep getting exceptions from the Sqlcommand by and execute query. how do I fix this?
Same
@@take_the_trade just found my problem dude haha double check if ur textbox has .text after it
@@andreymanlapig8584 got it ... Thanks
Thanks for your help.
how can i add if statment in this code to show messageBox if the text Box left emty
Thank you.
How do you check if a record already exists during the insert
That's why ID field is made as Primary key. Database cannot contain duplicate Primary key value.
@@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.");
}
how about when you are not using int and you are using string how will you convert int to string so that you will not encounter unhandled exception
You just skip the parse command, like he has for '@Name'... since the text box input default is a string.
how do use the sql server in visula studio?
anyone help me
what if i dont want to search only on ID but leave ID open and fill in the name?
Sir when iam using update query it's showing database is locked massage is showing plz help me
Dude, that update code updates all the rows in the table, with the same values. You need to fix that with "where" statement to update only one row.
definitely we should add where clause.
Everything is well, but the data does not get updated. The table is till empty
Thank you so much for this! can you perhaps make an android Xamarin version of this using c# as its language?
Hi why i cant create new connection?? It has no server name option when i click the dropdown button. I am newbie sir.
great no one responded to you over 10 months...
Same with me 😢
No responded after 2 years? 😭
Need to improve separate your form in Add, Edit then call to your main form
Sir Can u Share Registration from Bcz I Like ur teaching sir....
Yes, soon
If i put nothing in ID and search it gives error please give the solution of that
Just add code if (IDTextBox.Text !="")
@@SwiftLearn says error : input string was not in a correct format ,
thanks a lot
Pls did not understand how you connect ur database
Connect SQL server using Server Explorer in Visual Studio. you can get the connection property.
My server names are not loading, What can i do?
Type manually and connect.
I kept having invalid column name error for the Id on the UPDATE button command
I want to search, write the letter of the name, how??????
Getting exception at con.open();
Thank u very match I can’t thank u enough my friend keep going easy to follow and all done thanks❤️❤️👍👍
Thanks for your comment. you are very kind.
I love you
Thank you
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!
do u know now what that means
what's u'r server name, if that's backslash in y'r server name try to double it (\\), that was i think, because i have same problem before
How to make database like this for mobile
there is no data connections in my server explorer..
In server explorer you will get a icon to connect to server. click on the icon and connect to the SQL server. Thanks.
how can restart service sql
right click on My PC, Click on Manage, click on service in left pane. click on Microsoft SQL Server and restart. Thanks.
thanks
Most welcome. Please keep connected
iska source code provide kar sakty hain?
I need your help
The ExecuteNonQuery ... didn't work
Can I get your email I need your help in one of my assignments?
Please to see your comment that you like my tutorial. you can connect with me through facebook.com/rowshanp
provie the source code plz
source code?
Syntax error show - con = Open();
This code 'Open()' 👈 the name 'Open' does not exist in this context.
Solution? ??
too confusing
Thanks for your comment. If you please write details about confusion i will try to resolve it. i will always appreciate your comment.
Det
Ey I get to be the first dislike! :D
Really! Please suggest me, how to make batter for you. thanks.
when I run the code it said that "System.Data.SqlClient.SqlException: 'Incorrect syntax near the keyword 'Table'.'" in line with cmd.ExecuteNonQuery();
Check your SQL query.
BIG SHIT!
{"Input string was not in a correct format."}
It means you are trying to insert string into int type. check and write accurately.
@@SwiftLearn i do ths same like u in vicdo.
Thank you so much 👏👏👏👏👏👏
thanks