With some help from people on here and some examples I found on Google, I have successfully managed to bind a datagridview to a dataset connected to a mysql database and using the command builder to update any changes back to the database.
This is all well and good, however the datagridview isnt particularly user friendly in GUI terms so I'm attempting to create a more intuitive design using text boxes for data entry instead. I have replaced the datagridview with a text box for each column in the database and have bound the data using the following code, with one line for each box pointing to the appropriate datacolumn:
[XCODE] txtForename.DataBindings.Add("Text", ds.Tables(0), "forename")[/XCODE]
Using this code when I run the program data from the first row in the database displays in the text box as anticipated however when I run ds.update it no longer works as it did with the datagridview and any changes I make in the text box are not comitted to the database.
Where am I going wrong?
This is all well and good, however the datagridview isnt particularly user friendly in GUI terms so I'm attempting to create a more intuitive design using text boxes for data entry instead. I have replaced the datagridview with a text box for each column in the database and have bound the data using the following code, with one line for each box pointing to the appropriate datacolumn:
[XCODE] txtForename.DataBindings.Add("Text", ds.Tables(0), "forename")[/XCODE]
Using this code when I run the program data from the first row in the database displays in the text box as anticipated however when I run ds.update it no longer works as it did with the datagridview and any changes I make in the text box are not comitted to the database.
Where am I going wrong?