Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 09-05-2010, 11:33 AM   #1 (permalink)
Right Off the Assembly Line
 
deepakgates's Avatar
 
Join Date: May 2008
Location: Home
Posts: 36
Default Syntax error in UPDATE statement


Hey im trying to update field password in a access database but obviously i cant
thats why i am here

here goes my effort

Quote:
Imports System.Data
Imports System.Data.DataTable

Public Class change_password
Dim con As New OleDb.OleDbConnection
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String

Private Sub change_password_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source =lispwd.mdb"

con.Open()

sql = "SELECT * FROM tblpwd"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "lispwd")

con.Close()

End Sub

Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click

Dim cb As New OleDb.OleDbCommandBuilder(da)

ds.Tables("lispwd").Rows(0).Item(1) = newpwd.Text
da.Update(ds)
MsgBox("Password changed")

End Sub
End Class
end then error on da.update statement says "Syntax error in UPDATE statement."
deepakgates is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
AutoPatcher Vista June 2007 Core Release Dark Star Random News 1 19-06-2007 12:14 AM
AutoPatcher September 2006 for Windows XP Service Pack 2 hyde Software Q&A 2 20-09-2006 08:18 AM
Nokia Software Updater neerajvohra Technology News 16 31-08-2006 02:26 PM
WindowsXP update released (Nov 8, 2005) - link and review hcp006sl Software Q&A 29 09-11-2005 09:52 PM

 
Latest Threads
- by Charan
- by Charan
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 03:17 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2