ado.net application

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............
 
C

Cor Ligthert[MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top