473,405 Members | 2,185 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,405 software developers and data experts.

recordset.update method primarykey

Fary4u
273 100+
Hi,

I'm attempting to update a record via the recordset.update method, However, the recordset object is defined and accesses the correct record that I want to update, as I can retrieve field values from the record.

The open string for the recordset that I'm using should allow changes:

Expand|Select|Wrap|Line Numbers
  1. ors.open "Select * from products where productname='"&request("txtname")&"'",ocon1,Adopendynamic,Adlockoptimistic
  2.  
there is no problem to update statement but when i use with primarykey & it's automatic number using the following code then : (

Expand|Select|Wrap|Line Numbers
  1. ors.open "Select * from products where productID='"&request("txtids")&"'",ocon1,Adopendynamic,Adlockoptimistic
  2.  
Microsoft JET Database Engine (0x80040E07)
Syntax error in date in query expression 'productID="89"

Is there some other "object" that needs to be defined to allow changes to the record, or something else that I am missing that causes this update to fail?

thanks 4 u reply ( Fary )
Jul 4 '09 #1
1 2409
jhardman
3,406 Expert 2GB
primary key should not be in quotes:
productID=89 'correct
productID="89" 'incorrect

Let me know if this helps.

Jared
Jul 6 '09 #2

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

Similar topics

23
by: Rob Meade | last post by:
Lo all, Ok - this is what I was aiming to do, and then I thought - naahhh, that cant be right! query database results to recordset results to array using GetRows update values in one column...
22
by: Gerry Abbott | last post by:
Hi all, I having some confusing effects with recordsets in a recent project. I created several recordsets, each set with the same number of records, and related with an index value. I create...
0
by: Mark | last post by:
Hi everyone. I'm doing some updating from one recordset to another and the operation seems to get part way through and then seems to hang (as if it was a bad loop) but then comes alive again...
5
by: Henry Su | last post by:
Hello All, I am looking to whip a recordset out of thin air through a series of database record manipulation (so there is no physical equivalence to any database entities such as a table or...
1
by: Mike | last post by:
I have an ASP.NET/VB app that updates values in a DataTable over the course of about 3 different pages. On the way out of the first of these pages, I explicitly build the DataTable from values in...
5
by: zMisc | last post by:
Are there any tricks in updaitng a JOINed recordset? I joned to tables and when I try to change a field on the recordset and update it, I get this error: "Unknown column 'CCDE' in 'where...
2
by: Miro | last post by:
I will ask the question first then fumble thru trying to explain myself so i dont waste too much of your time. Question / Statement - Every mdb table needs a PrimaryKey ( or maybe an index - i...
1
by: sphinney | last post by:
All, I have a ADODB.Recordset in my Access 2002 project. I've been able to successfully add fields to the record set. According the the MS Access help files, I now must update the recordset to...
0
ADezii
by: ADezii | last post by:
When you create an ADO Recordset, you should have some idea as to what functionality the Recordset does/does not provide. Some critical questions may, and should, be: Can I add New Records to the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.