Hi, Here I am again looking for information and advice using ado.net and datasets.
Since I;ve been using dataset quite a bit now I feel I have become quite proficient with them and find them very easy, but I may be using them unnecessarily because I am now so familiar with I automatically add a dataset to every class (Form) and use it to amend, delete, add a record and then update the database.
But then one day I was adding a new record of about 20 fields to my Clients table (no datagridview this time) and I automatically started to use a ado.net to attempt retrieve an empty dataset or event maybe one record from the database, add my new record to the empty dataset and save back to database when I realised I should really just capture the data on a form and use a very long sql INSERT command !
But I just love using datasets and it avoids possible sql injections???(maybe) so I then thought I wonder is it possible to add a new single record to an empty dataset and save back to database? is this even good practice, would sa.fillschema(ds,"TblName") do the job even?
Since I;ve been using dataset quite a bit now I feel I have become quite proficient with them and find them very easy, but I may be using them unnecessarily because I am now so familiar with I automatically add a dataset to every class (Form) and use it to amend, delete, add a record and then update the database.
But then one day I was adding a new record of about 20 fields to my Clients table (no datagridview this time) and I automatically started to use a ado.net to attempt retrieve an empty dataset or event maybe one record from the database, add my new record to the empty dataset and save back to database when I realised I should really just capture the data on a form and use a very long sql INSERT command !
But I just love using datasets and it avoids possible sql injections???(maybe) so I then thought I wonder is it possible to add a new single record to an empty dataset and save back to database? is this even good practice, would sa.fillschema(ds,"TblName") do the job even?