TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Leonardo Francisco
NA
5
2.1k
Updating database with datatable
Feb 19 2011 1:29 PM
Hi guys
little help here, im creating a small application but i'm stuck on the following:
I've got a datatable that takes the data out of my db and put int in Datagridview
now once there i want to change it and update the database fields with the new values.
how do I do that?
this is what im trying to do
[code] rs = New ADODB.Recordset
sSQL = ("Select * from [Main] where Nome = '" & linha("Nome") & "'")
rs.ActiveConnection = cn
rs.CursorLocation = ADODB.CursorLocationEnum.adUseClient
rs.CursorType = ADODB.CursorTypeEnum.adOpenDynamic
rs.LockType = ADODB.LockTypeEnum.adLockOptimistic
rs.Open(sSQL)
With rs
If Not .EOF Then
For Each row As DataGridViewRow In dgv.Rows
.s()
.Fields("Morada").Value = Val(.Fields("Morada").Value) - Val(linha("Morada"))
.UpdateBatch(ADODB.AffectEnum.adAffectAll)
Next
[icode]
Reply
Answers (
1
)
How to update a record with primary key using stored procedure.
Can any one help with good books or videos of web services and the xml (XSD and xslt) transformations