Excellent tutorial! Many of us who followed these steps, and then ran the form, could not save the data inspite of clicking on the Save icon. Thoughts? I do have one other question...I have included a line in the table with 'image' selected as type of input. I'd like to upload an image on that line and into the form/app. Can you point me in the right direction? Thank you! (Bonus
hello ! I've created a database project like this. It works well on my computer but when I move debuged folder on another computer it doesn't work well. What Prerequisites needed to be install on that computer to run sql base projects. Thank you
I don't know if you got an answer for this already, but I think you might need to make an installer, and then install that on the other machine to work. I just happen to see that on another video right before this one called "Build & Deploy C# Application And run it on any machine"
Excellent tutorial! Many of us who followed these steps, and then ran the form, could not save the data inspite of clicking on the Save icon. Thoughts? I do have one other question...I have included a line in the table with 'image' selected as type of input. I'd like to upload an image on that line and into the form/app. Can you point me in the right direction? Thank you! (Bonus question: during the video, just after dragging the dataset to the form, it shows a quick move (step) in making the ID field disappear. It was so quick that even after rewinding several times, I couldn't catch the step. Can anyone shed some light on that?) Thanks.
Thanks but this actually doesn't store the data in the actual database. It only saves the data in the dataset temporarily. So, after closing the application, the data will be deleted and cannot be found in the database. A piece of code is missing in order to physically store the data into the database.
There's no code missing. Because you are running the program on the original folder, the data in the debug folder is deleted when u run (compile) the app again. Just copy the contents of the debug folder to another folder, e.g. "c:\myapps" and the table data will not be lost after you click on save button. When u run the program again, they'll be there.
Hi! Great video. However I have one question: I followed your steps but my first input is not shown. Second row is fine and so on (so ID 2 is in row2/first row beneath header row). Any idea why? And how can I save the data to the table after closing the (compiled) program and also load data when opening it?
Because you are running the program on the original folder, the data in the debug folder is deleted when u run (compile) the app again. Just copy the contents of the debug folder to another folder, e.g. "c:\myapps" and the table data will not be lost after you click on save button. When u run the program again, they'll be there.
@@osanbrazil999 Thanks. Many of us who followed these steps, and then ran the form, could not save the data inspite of clicking on the Save icon. I'll give your suggestion a try. I do have one other question...I have included line in the table with 'image' selected as type of input. I'd like to upload an image on that line and into the form/app. Can you point me in the right direction? Thank you!
Great video, thank you. I do have a problem though and would be very grateful for any help. When I run the data configuration wizard, after I have selected the table and click finish I keep getting an error. Could not find file dbo.Purchase, Purchase being the table name.
i have an issue: i created a setup project to "install"the program (changed to release mdoe), and when i launch the installed program it says it either cannot connect to the db or a db with the same name already exists, whats going on?
Hello. First, thanks for the video it saved me a lot of work/research. I'm having a separate issue that I think you might be able to help me with. I have two solutions, one similar to this that edits a database (for testing purposes), and another which is reading the database and doing stuff with the data. What I want to do is deploy these two projects together, so if anyone clones the repo they have full functionality. For my other project, I have manually configured the connection string to read the database from the executing folder and that solution copies the database to the executing folder. So I maintain a "virgin" copy of the db in the original location, and then edit the one in the runtime folder. I've included the same db in the db editing program. However, when I compile it, it connects to the "virgin" db as I can see that is where the connection string is pointing. I've played around with the connection string and keep getting an error "An attempt to attach an auto-named database for file ... failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share." I'm hoping you can tell me how to get it to point to the db in the runtime directory, rather than the original one. Thanks!
When I put FullName, Email, Phone, Gender, Adress for first user it doesn't appear, it starts appearing only from second user, someone know solution? Also Gender in Gridview is just showing check ON/ OFF its not right solution, as you can see in 9:07minutes.
hello thanks for the video. in some vdeos there are both (local database option and service based option) in their visual studio ...but in my visual studio 2013 there is only service based database just like in this video..is there any difference and why i cant see localdb option ?
Great video 😁 I have a little question. Years ago you made a video to send whatsapp messages from c#, could you update it? Or there is not posible to send messages like that anymore
I have one question I have to create an database application for offline data entry for my client, So can I use this method? So do I need to install sql in my cluent pc or just provide him project setup?
Hi fox learn in fact I need a tutorial on how to create a login and authorization system with different selectable roles via Treelist based on my Devexpress ribbon menu. Thank you.
Hai please update a video to select multiple database by using combobox method in C# along with with external data base exe setup. I will be very help full for beginners.
Nice video thank you!!! Can I ask if someone of you know how to solve this problem I am using ssms 2017 express server on my application it is working properly on my pc but when I am using another pc (aka client machine) it doesn't working - error 26. It is not important I am student who is creating something like school project. I researched in stack or github but no result. Thank you again for this video!
Hi there, when i run my project, the local database loses connection which makes impossible to save data from the form to the DB. Do you guys have an idea on how to solve that issue?
you mean the icon gets a little red cross in its corner? If that it does not mean that the database loses connection. If you look in your project folder there are several databases. The one in the root gets copied to the bin/debug folder everytime you run the project in Visual studio. When you stop running the project that database gets to the state it was before runnig. Try running the exe file in bin/debug filder. It will affect the database in that folder and all the changes must get applied
simple way for connection using MySql.Data.MySqlClient; using System.Data.SqlClient; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace mudi_13_10_databse_trainings { public partial class Form1 : Form {
Good Lord thank you. This answered like a third of the questions I had about the use of database in VS2019.
He made it so simple and easy to understand ...
Thank you !
Last min revision...Thanks a lot mam
thank you for this video !! it easy to understand and make me clearly to do it>>>>
God bless this tutor so much abegggg. This was sooo sooo helpful
It's fast
But one of best Tut so far
Thank U❤️
THANK U SO MUCH YOU SAVED ME FOR GETTING A 75 GRADE!!
thanku brother
in this video i have cleared my database doutss
Excellent tutorial! Many of us who followed these steps, and then ran the form, could not save the data inspite of clicking on the Save icon. Thoughts? I do have one other question...I have included a line in the table with 'image' selected as type of input. I'd like to upload an image on that line and into the form/app. Can you point me in the right direction? Thank you! (Bonus
*If someone can't find Data Sources:*
In my case it was in View > Other windows > Data Sources
hello !
I've created a database project like this.
It works well on my computer but when I move debuged folder on another computer it doesn't work well.
What Prerequisites needed to be install on that computer to run sql base projects.
Thank you
I don't know if you got an answer for this already, but I think you might need to make an installer, and then install that on the other machine to work. I just happen to see that on another video right before this one called "Build & Deploy C# Application And run it on any machine"
This is not a Local Database, this database requires SQL server service. So you still need to install SQL server.
Excellent tutorial! Many of us who followed these steps, and then ran the form, could not save the data inspite of clicking on the Save icon. Thoughts? I do have one other question...I have included a line in the table with 'image' selected as type of input. I'd like to upload an image on that line and into the form/app. Can you point me in the right direction? Thank you! (Bonus question: during the video, just after dragging the dataset to the form, it shows a quick move (step) in making the ID field disappear. It was so quick that even after rewinding several times, I couldn't catch the step. Can anyone shed some light on that?) Thanks.
Awesome! Easy to follow =D
Thanks but this actually doesn't store the data in the actual database. It only saves the data in the dataset temporarily. So, after closing the application, the data will be deleted and cannot be found in the database. A piece of code is missing in order to physically store the data into the database.
can you learn me how i can store data in database ?
What code do you need for it to permanently save?
@@zendpro61 lkln
@@tomhrcze you know how ?
There's no code missing. Because you are running the program on the original folder, the data in the debug folder is deleted when u run (compile) the app again. Just copy the contents of the debug folder to another folder, e.g. "c:\myapps" and the table data will not be lost after you click on save button. When u run the program again, they'll be there.
I'm subcrubesd. Ncie videos.
Hi! Great video. However I have one question: I followed your steps but my first input is not shown. Second row is fine and so on (so ID 2 is in row2/first row beneath header row). Any idea why? And how can I save the data to the table after closing the (compiled) program and also load data when opening it?
I'm having the same issue. Seems no matter what data is in the fields, that first entry returns everything but the index as null values.
Did you solve it? :c
Click on save button when you run.
Because you are running the program on the original folder, the data in the debug folder is deleted when u run (compile) the app again. Just copy the contents of the debug folder to another folder, e.g. "c:\myapps" and the table data will not be lost after you click on save button. When u run the program again, they'll be there.
@@osanbrazil999 Thanks. Many of us who followed these steps, and then ran the form, could not save the data inspite of clicking on the Save icon. I'll give your suggestion a try. I do have one other question...I have included line in the table with 'image' selected as type of input. I'd like to upload an image on that line and into the form/app. Can you point me in the right direction? Thank you!
Another excellent video. Thanks and keep up the quality work.
Thank you so much !
Great video, thank you. I do have a problem though and would be very grateful for any help. When I run the data configuration wizard, after I have selected the table and click finish I keep getting an error. Could not find file dbo.Purchase, Purchase being the table name.
Very good, worked. Thank you!
the most helpful one ! thank you so much
i have an issue: i created a setup project to "install"the program (changed to release mdoe), and when i launch the installed program it says it either cannot connect to the db or a db with the same name already exists, whats going on?
Nc video
😍😍😍😍
🇧🇩🇧🇩🇧🇩🇧🇩
hey , i dont have the add new, cancel, save button on top after running the program, what should i do?
Incredibly useful - thank you.
Glad it was helpful! thank you !
is it possible to migrate ms access database to the cloud and still be able to connect using c#?
Hello. First, thanks for the video it saved me a lot of work/research.
I'm having a separate issue that I think you might be able to help me with. I have two solutions, one similar to this that edits a database (for testing purposes), and another which is reading the database and doing stuff with the data.
What I want to do is deploy these two projects together, so if anyone clones the repo they have full functionality. For my other project, I have manually configured the connection string to read the database from the executing folder and that solution copies the database to the executing folder. So I maintain a "virgin" copy of the db in the original location, and then edit the one in the runtime folder.
I've included the same db in the db editing program. However, when I compile it, it connects to the "virgin" db as I can see that is where the connection string is pointing. I've played around with the connection string and keep getting an error "An attempt to attach an auto-named database for file ... failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."
I'm hoping you can tell me how to get it to point to the db in the runtime directory, rather than the original one.
Thanks!
can we prevent data lose on rebuilding the project while using this db method?
Copy your database to another folder, then modify your connection string
Even after all there years I still can't remember where I heard this ost you are using XD
Thank you !
OMG. IT WAS THAT EASY!!! FML
Thank you !
oh my gosh I needed this soo much
Thank you !
When I put FullName, Email, Phone, Gender, Adress for first user it doesn't appear, it starts appearing only from second user, someone know solution? Also Gender in Gridview is just showing check ON/ OFF its not right solution, as you can see in 9:07minutes.
hello thanks for the video. in some vdeos there are both (local database option and service based option) in their visual studio ...but in my visual studio 2013 there is only service based database just like in this video..is there any difference and why i cant see localdb option ?
The same, sql database connect to sql express is local. and attach to sql server, then connect to sql server is sql service. i think so
@@foxlearn thanks
Excellent video. Thanks a ton.
do you have this for 2012 version of visual studio
Very good video, but ModelDataSet contents shown on 3:50 not moving for me so easy with mouse
Solved: Had to put VS window back from external monitor on laptop, and everything works perfect
Thank you !
If i copy this program to another computer will i have saved database ?
Great video 😁
I have a little question.
Years ago you made a video to send whatsapp messages from c#, could you update it? Or there is not posible to send messages like that anymore
OK. Let me try to research and update
I have one question
I have to create an database application for offline data entry for my client, So can I use this method?
So do I need to install sql in my cluent pc or just provide him project setup?
Yes, you can do the same for sql
Is there a way to save the database even when you close the program?
did you find out how to do that
do i need internet to access this type of database?
Hi fox learn in fact I need a tutorial on how to create a login and authorization system with different selectable roles via Treelist based on my Devexpress ribbon menu. Thank you.
Well excellente suggestion i need that tutotial toi dear fox Learn
OK. Thank you for your suggestion. I'll upload soon !
This is fantastic
This is fri good
Thanks a lot
Thanks a lot.
Is the procedure the same in asp net?
Yes
Nothing displays in the grid view. How can i fix this?
How to add buttons one by one for save, delete, add, and same design like there?
hey same problem with me, were you able to find a solution?
Is this only for one pc? How can it connect to other PC's? Thank you
Only one pc, if you want to multiple connection you should install sql server, then the clients can connect to sql server
@@foxlearn how do you do that?
Does anyone knows how to change the gender using an edit button?
This error shows when I try to save an item
Update requires a valid UpdateCommand when passed DataRow collection with modified rows.
Hi fox learn Thanks for all videos, i need help : how to create master details application and insert data into master table and datails table in c#
Omg! Thanks
excellent
Hai please update a video to select multiple database by using combobox method in C# along with with external data base exe setup. I will be very help full for beginners.
OK. Thank you for your suggestion. I'll upload soon !
according to i create a form and insert value data and show in same form gridview but when i check in folder data not show
You should copy data to another folder
can you please do money lending project in visual studio C#
i can't create new table ... why ?
PLS HELP
i do everything in this video but now i want to add search button to this code pls help me
Thnku
The most important part is missing: how can I create that mdf file?
working bro! Thanks a lot, +sub +like
thanks
is Local DB require Sql Server installation on client machine?
Thanks:)
Yes, you should install sql express
Nice video thank you!!!
Can I ask if someone of you know how to solve this problem I am using ssms 2017 express server on my application it is working properly on my pc but when I am using another pc (aka client machine) it doesn't working - error 26. It is not important I am student who is creating something like school project. I researched in stack or github but no result. Thank you again for this video!
You should install sql express on client machine
@@foxlearn ok thank you
how to do auto increment start 1 entity framework? edmx diagram
You can set to the table in your database
@@foxlearn can you send tut?
How you publish that app with database?
OK. Thank you for your suggestion. I'll upload soon !
Hello, can you tell me How to add reference of microsoft.offic in 2019
Right click on your project, then select reference. Next, find the Microsoft.Office..
Hi there, when i run my project, the local database loses connection which makes impossible to save data from the form to the DB. Do you guys have an idea on how to solve that issue?
you mean the icon gets a little red cross in its corner? If that it does not mean that the database loses connection. If you look in your project folder there are several databases. The one in the root gets copied to the bin/debug folder everytime you run the project in Visual studio. When you stop running the project that database gets to the state it was before runnig. Try running the exe file in bin/debug filder. It will affect the database in that folder and all the changes must get applied
@@dr.kenhurt9832 ,Thanks!
cant find my data sources
@@radenazhar3112 nooe but try reinstalling everything
@@jmdeluxe does it work bro?
@@radenazhar3112 yee i have freash laptop and I did my installing in there everything work in my laptop but not on oc
data binding does work WTF
Music name?
ok. now how do I host the database on a server :gun:
How to insert photos
This kind of Tutorials began in 2005. it's very old trick. we need the connection code not wizard..
Whats wrong if something can be done in an easy way why you want to hide the things software enginner bro.
Please guide xamarin form c # topic, thanks
OK. Thank you for your suggestion !
It is good this is not a tutorial on good database or UI design because both are atrocious in the video.
Nowdays gender needs to be stored as a bigint
The "gender = bit" is a hot take in today's reality lol
like
Thank you !
wayy to fast lmao
im a zhee
Thank
This don't save any data, useless, a waste of time.
simple way for connection
using MySql.Data.MySqlClient;
using System.Data.SqlClient;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace mudi_13_10_databse_trainings
{
public partial class Form1 : Form
{
SqlConnection con = new SqlConnection(@"Data Source = LAPTOP-2A5CNVC3\SQLEXPRESS; Initial Catalog = Countries; Integrated Security = True");
SqlCommand cmd = new SqlCommand();
public Form1()
{
InitializeComponent();
}
private void btnClear_Click(object sender, EventArgs e)
{
dgvShowData.DataSource = null;
}
private void btnExit_Click_1(object sender, EventArgs e)
{
Application.Exit();
}
private void btnShow_Click_1(object sender, EventArgs e)
{
try
{
con.Open();
cmd = new SqlCommand("Select * from Coutnry", con);
cmd.ExecuteNonQuery();
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dtable = new DataTable();
da.Fill(dtable);
dgvShowData.DataSource = dtable;
con.Close();
}
catch
{
MessageBox.Show("Error 404");
}
}
private void dgvShowData_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
}
}
Thank you very much