ado.net application

  • Thread starter Thread starter mo/-/sin
  • Start date Start date
M

mo/-/sin

hi i m mohsin............
i made a application in ado.net using c# at front end and sql server
2005 at back end..........
i apply 4 text boxes in the apllication and bind it to the service
_maintenance table in sql derver........
there are 4buttons also naming add, save,delete and
update..............
first three buttons are joing properly but now i want that if i
change
any value in the text boxes
and click on update the value wil get save in sql server 2005.....
can u plz provide me the code for doing so............
 
Mo shin,

Did you use a dataset or something like linq.

With the later it is very simple

Create a datacontext using the item Linq to SQL by instance with the name
My.

MyDataContext dc = MyDataContext();
var a = dc.MyTable
..Where(x => x.TheColumn == theWantedColumn)
..FirstOrDefault;

a.TheColumn = TheTextbox;

dc.Submitchanges()

This is just written in this message, so can have typeerrors which you don't
have when you see it in your Visual Studio IDE.

Cor
 
Back
Top