If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Row cannot be located for updating

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-23-09, 21:41
Sammy 1 Sammy 1 is offline
Registered User
 
Join Date: Jul 2009
Posts: 2
Row cannot be located for updating

July 22, 2009

Hello anyone out there,

The table “tblHeading” has only ONE record which I update now and then.

With adoHeading.Recordset
Deyt = "As of " & Format(Date, "mmmm dd, yyyy")
!hAsof = Deyt
!hPrintedBy = "Printed by: " & User
!hCompany = CompanyName
!hAddress = CompanyAddr
!hSSSId = CompanySss
!hMedId = CompanyMed
!hIbgId = CompanyIbg
!hTIN = CompanyTin
!hTelephone = CompanyTel
.Update
End With


In MS Access, the VB6 code above works very well. But when I converted the table to SQL and run the code, there is error that says:

Row cannot be located for updating. Some values may have been changed since it was last read.”

How can the row be not located when there is only ONE record in the table?
Please help. Thanks.

Simeon
Reply With Quote
  #2 (permalink)  
Old 07-23-09, 23:00
UtOkbOlinAO UtOkbOlinAO is offline
Registered User
 
Join Date: Jul 2009
Posts: 11
how do u wrote your SQL?
Reply With Quote
  #3 (permalink)  
Old 07-24-09, 01:27
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,258
strSQL ="update MyTable set hAsof = 'As of " & Format(Date, "mmmm dd, yyyy") & "'" _
", hPrintedBy = 'Printed by: " & User "'" & _
......
rest of the sql bearing in mind string/text/char fields must be encapsualted in " or '

then either
docmd****nsql strsql

or

currentproject.connection.execute strsql
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton

Last edited by healdem; 07-24-09 at 01:37.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On