G
Guest
All,
I'm pulling what little hair I have left on figuring out the concepts of DataSets, DataAdapters and what I find in all of the various books and samples I've accumulated of late.
Here's the Interface I'm trying to make work:
1. WinForm containing Grid and Buttons. Grid contains a selection of existing records in a table. If I double click on a record in the grid, I open another window showing all of the details for that specific record. (this form has ALOT of fields that need to be displayed, so screen real estate is at a premium)
2. If I click on a 'New' Button, then I open the same window without any data loaded with empty fields. I can then enter the new data, I click on the Save button, then I close the detail record and repopulate the grid on the calling form.
So, where I'm banging my head, is getting the the darn Insert & Update to work as I see NO changes making it to the database.
Question 1: For a 'New' record, it seems that using a Dataset is overkill as I should simply use a Command Object, load the parameters with the form values and simply do an ExecuteNonQuery. This seems like it would be faster and not have a lot of overhead. I've tried doing a dataset bit, but simply CAN'T get the InsertCommand associated to the DataAdapter to perform the Insert as it doesn't show up in the database. Frustrating and I feel I'm missing a key bit of understanding here.
Question 2: I'm using VS.Net 2003 and have gone through the various tutorials and so have gone through the process of using the wizard to generate Connections, DataAdapters and Datasets but all of these items are located in a section of code that says not to mess with it. Unfortunately, most of the books seem to show examples where they are generating most of the code by hand. What are most of you out there doing? The click and drag bit, or laying code out the old fashioned way? Sometimes, I feel like the IDE is doing so much for me, I'm just not understanding how things are really working under the hood. Not a good thing in my book.
Sorry this is so long, but I'm really stymied right now and desparately need to have some forward motion here.
Thanks to any that may extend a helping hand....Bobbo
I'm pulling what little hair I have left on figuring out the concepts of DataSets, DataAdapters and what I find in all of the various books and samples I've accumulated of late.
Here's the Interface I'm trying to make work:
1. WinForm containing Grid and Buttons. Grid contains a selection of existing records in a table. If I double click on a record in the grid, I open another window showing all of the details for that specific record. (this form has ALOT of fields that need to be displayed, so screen real estate is at a premium)
2. If I click on a 'New' Button, then I open the same window without any data loaded with empty fields. I can then enter the new data, I click on the Save button, then I close the detail record and repopulate the grid on the calling form.
So, where I'm banging my head, is getting the the darn Insert & Update to work as I see NO changes making it to the database.
Question 1: For a 'New' record, it seems that using a Dataset is overkill as I should simply use a Command Object, load the parameters with the form values and simply do an ExecuteNonQuery. This seems like it would be faster and not have a lot of overhead. I've tried doing a dataset bit, but simply CAN'T get the InsertCommand associated to the DataAdapter to perform the Insert as it doesn't show up in the database. Frustrating and I feel I'm missing a key bit of understanding here.
Question 2: I'm using VS.Net 2003 and have gone through the various tutorials and so have gone through the process of using the wizard to generate Connections, DataAdapters and Datasets but all of these items are located in a section of code that says not to mess with it. Unfortunately, most of the books seem to show examples where they are generating most of the code by hand. What are most of you out there doing? The click and drag bit, or laying code out the old fashioned way? Sometimes, I feel like the IDE is doing so much for me, I'm just not understanding how things are really working under the hood. Not a good thing in my book.
Sorry this is so long, but I'm really stymied right now and desparately need to have some forward motion here.
Thanks to any that may extend a helping hand....Bobbo