|
-
Mar 5th, 2011, 12:44 PM
#1
Thread Starter
Member
Updating database table.
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.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|