473,320 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Error In Query (Update)

What is wrong in this code ?

Expand|Select|Wrap|Line Numbers
  1. rs.Open " update TblName set FldNum=" & text1.Text & " where ID_FldName=" & Text2.Text , db, adOpenDynamic, adLockOptimistic 
  2.  
  3.  
Knowing that
FldNum ---> Data type (Number)
ID_FldName ---> Data Type (AutoNumber)

And What the correct code ?
Jul 14 '10 #1
1 1128
QVeen72
1,445 Expert 1GB
Hi,

Execute on Connection Object :

Db.Execute " update TblName set FldNum=" & text1.Text & " where ID_FldName=" & Text2.Text


Regards
Veena
Jul 14 '10 #2

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

Similar topics

3
by: Robert Mark Bram | last post by:
Hi All! I have the following two methods in an asp/jscript page - my problem is that without the update statement there is no error, but with the update statement I get the following error: ...
3
by: Bill Clark | last post by:
I have about 20,000 records pulled from Excel that I need to update. What I need to do is run an update query that bascially says: If a field is null, update it with the previous record value of...
7
by: Mark Carlyle via AccessMonster.com | last post by:
I have this update query that I am trying to run. I know the syntax is messed up but do not know how to correct it. Select 'UPDATE', Transactions,'Set = where = ' From "Get Daily Balances" ...
2
by: sean | last post by:
Hi, I am trying to update an access database using an SQL statement, I keep getting an syntax error in update statment. I am passing in strChkBoxValue as a string value which is declared in...
1
by: amitbadgi | last post by:
HI i am getting the foll error while conv an asp application to asp.net Exception Details: System.Runtime.InteropServices.COMException: Syntax error in UPDATE statement. Source Error: Line...
1
by: Diarmuid | last post by:
From the data sources window, I dragged a query called qryWeeks onto my form. This created QryWeeksBindingSource QryWeeksTableAdapter QryWeeksBindingNavigator It displays fine, but the Save on...
11
by: diablo | last post by:
Hi i need help with formulating a query that will update the a field on one table depending on the values from another for example i have a cart table: cartid, buyerid, productid, quantity ...
8
by: Stephen Plotnick | last post by:
I have three forms and update one table in an Access DB with sucess in one form. In the other two forms I'm trying to do an update to a different table in the Access DB. The error I'm getting...
1
by: chitara | last post by:
is there any posibility to block mysql port or someting? I am getting "Error ,query failed" during adding any data through the admin panel of that website:-( same softwares(php, mysql and IIS)...
21
by: missflorenceokosun | last post by:
hi, am florence. i keep having a runtime error stating error in update query syntax. i have looked through my code over and over gain and seem to find no flaw. i need you guys to help me out! ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.