Click here to Skip to main content
15,888,454 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: The Problem in Update Command with Table Adapter VB.net Pin
Member 128130746-Aug-18 15:55
Member 128130746-Aug-18 15:55 
GeneralRe: The Problem in Update Command with Table Adapter VB.net Pin
Richard MacCutchan6-Aug-18 20:54
mveRichard MacCutchan6-Aug-18 20:54 
GeneralRe: The Problem in Update Command with Table Adapter VB.net Pin
Dave Kreskowiak7-Aug-18 6:14
mveDave Kreskowiak7-Aug-18 6:14 
GeneralRe: The Problem in Update Command with Table Adapter VB.net Pin
Member 128130747-Aug-18 15:37
Member 128130747-Aug-18 15:37 
GeneralRe: The Problem in Update Command with Table Adapter VB.net Pin
Member 128130747-Aug-18 22:57
Member 128130747-Aug-18 22:57 
GeneralRe: The Problem in Update Command with Table Adapter VB.net Pin
Member 128130747-Aug-18 18:02
Member 128130747-Aug-18 18:02 
GeneralRe: The Problem in Update Command with Table Adapter VB.net Pin
Richard MacCutchan7-Aug-18 20:56
mveRichard MacCutchan7-Aug-18 20:56 
GeneralRe: The Problem in Update Command with Table Adapter VB.net Pin
Member 128130747-Aug-18 22:27
Member 128130747-Aug-18 22:27 
Dear Mr Richard,


Thanks so much for your reply

I have tried by following your feedback.

I attach my code :

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
       Me.DatamahasiswaTableAdapter1.Fill(Me.LatihanDataSet.datamahasiswa)
       End Sub



Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Dim i As Integer
        Dim latihandataset As New latihanDataSet()
        Dim datamahasiswatableadapter1 As New latihanDataSetTableAdapters.datamahasiswa1TableAdapter
        Try
            Me.Validate()
            Me.LatihanDataSetBindingSource.EndEdit()
            Me.LatihanDataSet.Tables(0).Rows(1).Item(1) = TextBox1.Text
            i = datamahasiswatableadapter1.<big>Update</big>(latihandataset.datamahasiswa)
            Me.DatamahasiswaTableAdapter1.Update(LatihanDataSet.datamahasiswa)
            Me.DatamahasiswaTableAdapter1.Fill(latihandataset.datamahasiswa)
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
        MessageBox.Show("no of rows updated=" & i)
    End Sub


The result : Update is red underlined in vb.net

Please help me to solving this code, because the updating method has not yet run well.


This is supporting code for grid view, like below

Private Sub DataGridView1_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
       TextBox2.Text = Me.LatihanDataSet.Tables(0).Rows(1).Item(0)
       TextBox1.Text = Me.LatihanDataSet.Tables(0).Rows(1).Item(1)
   End Sub



Thanks so much for your time and attention,


My best regards,


Muljanto
GeneralRe: The Problem in Update Command with Table Adapter VB.net Pin
Richard MacCutchan7-Aug-18 22:35
mveRichard MacCutchan7-Aug-18 22:35 
GeneralRe: The Problem in Update Command with Table Adapter VB.net Pin
Member 128130747-Aug-18 22:53
Member 128130747-Aug-18 22:53 
Questioni want to do a car park booking system in vb, i use picbox to let user click, my questions is, how to link picbox to sql 2014, i means i need to know what picbox user selected, and it will auto record to sql 2014 Pin
Member 139364602-Aug-18 21:19
Member 139364602-Aug-18 21:19 
AnswerRe: i want to do a car park booking system in vb, i use picbox to let user click, my questions is, how to link picbox to sql 2014, i means i need to know what picbox user selected, and it will auto record to sql 2014 Pin
Richard MacCutchan2-Aug-18 21:50
mveRichard MacCutchan2-Aug-18 21:50 
AnswerRe: i want to do a car park booking system in vb, i use picbox to let user click, my questions is, how to link picbox to sql 2014, i means i need to know what picbox user selected, and it will auto record to sql 2014 Pin
Eddy Vluggen2-Aug-18 22:24
professionalEddy Vluggen2-Aug-18 22:24 
Questionhow to display user data after login in vb Pin
Member 139364602-Aug-18 21:12
Member 139364602-Aug-18 21:12 
AnswerRe: how to display user data after login in vb Pin
Richard MacCutchan2-Aug-18 21:48
mveRichard MacCutchan2-Aug-18 21:48 
SuggestionSome advice ... Pin
CHill602-Aug-18 21:55
mveCHill602-Aug-18 21:55 
QuestionDataGriedView Maestro - Detalle Pin
Member 1219672031-Jul-18 15:07
Member 1219672031-Jul-18 15:07 
AnswerRe: DataGriedView Maestro - Detalle Pin
dan!sh 31-Jul-18 20:22
professional dan!sh 31-Jul-18 20:22 
QuestionCan anyone Direct me to how to change Windows 'Settings' programmatically? Pin
Member 331739318-Jul-18 6:40
Member 331739318-Jul-18 6:40 
AnswerRe: Can anyone Direct me to how to change Windows 'Settings' programmatically? Pin
Richard Deeming18-Jul-18 7:34
mveRichard Deeming18-Jul-18 7:34 
GeneralRe: Can anyone Direct me to how to change Windows 'Settings' programmatically? Pin
Member 331739318-Jul-18 8:06
Member 331739318-Jul-18 8:06 
GeneralRe: Can anyone Direct me to how to change Windows 'Settings' programmatically? Pin
Richard Deeming18-Jul-18 8:21
mveRichard Deeming18-Jul-18 8:21 
GeneralRe: Can anyone Direct me to how to change Windows 'Settings' programmatically? Pin
Randor 18-Jul-18 15:02
professional Randor 18-Jul-18 15:02 
GeneralRe: Can anyone Direct me to how to change Windows 'Settings' programmatically? Pin
Dave Kreskowiak18-Jul-18 10:37
mveDave Kreskowiak18-Jul-18 10:37 
GeneralRe: Can anyone Direct me to how to change Windows 'Settings' programmatically? Pin
Member 331739318-Jul-18 11:29
Member 331739318-Jul-18 11:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.