Dear Sir,

Below mention code I used in Visual Basic 6 to update my MS Access Table to get UPDATED Balance Column. Now my problem is the same code I want to use in Visual Basic 2010 to update SQLserver Table. Can u guide me pls.

SQL Code in VB6.

With recordsetBank
.MoveFirst
Balance = .Fields("Balance")
Do While .EOF = False
Balance = Balance + .Fields("Debit") - .Fields("Credit")
.Fields("Balance") = Balance
.MoveNext
Loop
End With

For ur information : I have Dataset, Bindingsource and TableAdaptor in Windows Form so with that how can I update my Balance Column. The Table contained 3 columns i. Debit ii. Credit iii. Balance.

Thanks.