Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27156

VS 2012 [RESOLVED] update datarow

$
0
0
Please help me..What is wrong with following code?
Login table is not getting updated..
Code:

     
  'check login
        Dim sqlada As New SqlDataAdapter("select * from login where  lower(uname) =  '" & LCase(Replace(Me.txtuname.Text, "'", "")) & "' and pass  = '" & txtpass.Text & "'", con)
        Dim ds As New DataSet
        sqlada.Fill(ds, "login")



        If ds.Tables(0).Rows.Count = 0 Then
            MsgBox("Invalid user name / password")
            txtuname.Focus()
            ds.Dispose()
            sqlada.Dispose()
            Exit Sub
        End If

        ds.Tables(0).Rows(0).BeginEdit()
        ds.Tables(0).Rows(0)("logdt") = "01-jan-2013" 'get_server_date("o")
        ds.Tables(0).Rows(0).AcceptChanges()

        ds.Tables(0).Rows(0).EndEdit()


Viewing all articles
Browse latest Browse all 27156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>