472,340 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,340 software developers and data experts.

Updating a Access database

Hey guys,

I have tryed something new code with updating an access database but the error

Syntax error in UPDATE statement occurs every time i try to update. Can some please help me figure out why this problem is happening. Here is the code

Public Class Form1

Dim con As New OleDb.OleDbConnection("Provider = Microsoft.Jet.OleDB.4.0;Data Source = E:\WindowsApplication1\WindowsApplication1\bin\Deb ug\rl.mdb;")

Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click


End Sub

Public Function updatedata()

Dim str1 As String = "UPDATE playersnames SET Player Name = '" & TextBox1.Text & "' AND Meters = '" & TextBox2.Text & "'"

Dim cmd As New OleDb.OleDbCommand(str1, con)







End Function

Public Function intialization()

Dim adp As New OleDb.OleDbDataAdapter("select * from playermeters", con)

Dim dt As DataTable

Dim ds As New DataSet


dt = ds.Tables(0)

End Function

Public Function intialization2()

Dim adp As New OleDb.OleDbDataAdapter("select * from playersmeters", con)

Dim dr As DataRow

Dim dt As DataTable

Dim ds As New DataSet


dt = ds.Tables(0)

End Function

Jun 29 '07 #1
1 1127
4,871 Expert 4TB
Suggest you write the update statement and see if there is a problem.
Jun 30 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Fran Tirimo | last post by:
I am developing a small website using ASP scripts to format data retrieved from an Access database. It will run on a Windows 2003 server supporting...
by: RC | last post by:
I am updating/improving a working database for a non-profit organization. I am thinking of making a copy of the database at the office, bringing...
by: gaosul | last post by:
I am non-programming scientist and I am using a Program called Easyarticles from Synaptosoft Inc., which is based the database program Access....
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row....
by: Lars Netzel | last post by:
A little background: I use three Datagrids that are in a child parent relation. I Use Negative Autoincrement on the the DataTables and that's...
by: Alexey.Murin | last post by:
The application we are developing uses MS Access 2003 database (with help of ADO). We have noticed that during massive records updating the size of...
by: John T Ingato | last post by:
I have a contacts table with name address and such but are missing all phone numbers in the phone number fields. I have just received an updated...
by: aaron.m.johnson | last post by:
I have an application which contains an Access database with linked tables that point to another database within the application. The problem I...
by: bbasberg | last post by:
Hello, I have been struggling with this problem for DAYS and have googled my heart out as well as reading any books I could get my hands on but I...
by: Wavey | last post by:
Hi All, I have a problem with updating an Access database from a datatable. I have two rows of data in my database at the moment for testing, the...
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.