Showing posts with label located. Show all posts
Showing posts with label located. Show all posts

Friday, March 9, 2012

Row cannot be located for updating

Hi,

I am getting "Row cannot be located for updating. Some values may have
been changed" error when I try to update from visual basic with ado.
This happens only when set as default locale on the pc other language
than English.
Anybody can help on this

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!A M (antmios@.yahoo.com) writes:
> I am getting "Row cannot be located for updating. Some values may have
> been changed" error when I try to update from visual basic with ado.
> This happens only when set as default locale on the pc other language
> than English.
> Anybody can help on this

I can vaguely guess what is going on, but with out a reproducible case
I find it difficult to say anything useful. Can you provide a sample?
That would need to include both the CREATE TABLE statement for the table
and the VB code.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Row Cannot be Located for Update Error

Can anyone offer any suggetions as to what could be causing this error
in my ASP. Please dont mind the newbie code, I'm still pretty green
at this:
*******ERROR*******
Microsoft Cursor Engine error '80040e38'
Row cannot be located for updating. Some values may have been changed
since it was last read.
-- ASP Code Causing the Trouble --
strSQL = "SELECT * FROM WorkLog WHERE QuoteID = ""eID&" And stepID
= "&eventID
'Create the Recordset object and run SQL statement
Set logRS = Server.CreateObject ("ADODB.Recordset")
logRS.CursorLocation = adUseClient
logRS.Open strSQL, objConn,, adLockOptimistic
logRS("Completed") = True
logRS("CompletedBy") = secID
logRS("DateComplete") = Date()
logRS.Update <--ERROR HERE
'-- Trigger On Effected Table --
CREATE TRIGGER UpdateNextDue ON [dbo].[WorkLog]
FOR UPDATE
AS
Declare @.logID int,
@.quoteID int,
@.stepnum int,
@.userID int,
@.stepID int
Alter Table WorkLog Disable Trigger All
Set @.logID = (Select Log_ID From Inserted)
Set @.quoteID =( Select QuoteID From WorkLog Where Log_ID = @.logID)
Set @.stepID = (Select stepID From WorkLog Where Log_ID = @.logID)
Set @.stepNum =( Select Max(StepNum) From WorkLog Where quoteID = @.quoteID And Completed = 1)
Set @.userID =( Select UserID From WorkLog Where quoteID = @.quoteID And
StepNum = @.stepnum + 1)
If @.stepID <> '65'
Begin
Update WorkLog
Set NextDue = 1
Where QuoteID = @.quoteID And
StepNum = @.stepnum + 1
Alter Table Quotes Disable Trigger All
Update Quotes
Set NextStep = @.userID
Where @.quoteID = quoteID
Alter Table Quotes Enable Trigger All
End
Alter Table WorkLog Enable Trigger AllHow about instead of opening up a recordset, you just execute an UPDATE
statement?
objConn.Execute("UPDATE ... WHERE ...")
The error sounds like you don't have a primary key, or there's not enough
information to identify the row based on the primary key. Since you use
SELECT *, I'm assuming the former. Are you familiar with primary keys? Is
it possible that there is more than one row WHERE QuoteID = ""eID&" And
stepID
= "&eventID ?
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"belacyrf" <bela@.webnet-x.com> wrote in message
news:d0e7d44f.0405141126.20601f4@.posting.google.com...
> Can anyone offer any suggetions as to what could be causing this error
> in my ASP. Please dont mind the newbie code, I'm still pretty green
> at this:
> *******ERROR*******
> Microsoft Cursor Engine error '80040e38'
> Row cannot be located for updating. Some values may have been changed
> since it was last read.
> -- ASP Code Causing the Trouble --
> strSQL = "SELECT * FROM WorkLog WHERE QuoteID = ""eID&" And stepID
> = "&eventID
> 'Create the Recordset object and run SQL statement
> Set logRS = Server.CreateObject ("ADODB.Recordset")
> logRS.CursorLocation = adUseClient
> logRS.Open strSQL, objConn,, adLockOptimistic
> logRS("Completed") = True
> logRS("CompletedBy") = secID
> logRS("DateComplete") = Date()
> logRS.Update <--ERROR HERE
> '-- Trigger On Effected Table --
> CREATE TRIGGER UpdateNextDue ON [dbo].[WorkLog]
> FOR UPDATE
> AS
> Declare @.logID int,
> @.quoteID int,
> @.stepnum int,
> @.userID int,
> @.stepID int
> Alter Table WorkLog Disable Trigger All
> Set @.logID = (Select Log_ID From Inserted)
> Set @.quoteID =( Select QuoteID From WorkLog Where Log_ID = @.logID)
> Set @.stepID = (Select stepID From WorkLog Where Log_ID = @.logID)
> Set @.stepNum =( Select Max(StepNum) From WorkLog Where quoteID => @.quoteID And Completed = 1)
> Set @.userID =( Select UserID From WorkLog Where quoteID = @.quoteID And
> StepNum = @.stepnum + 1)
> If @.stepID <> '65'
> Begin
> Update WorkLog
> Set NextDue = 1
> Where QuoteID = @.quoteID And
> StepNum = @.stepnum + 1
> Alter Table Quotes Disable Trigger All
> Update Quotes
> Set NextStep = @.userID
> Where @.quoteID = quoteID
> Alter Table Quotes Enable Trigger All
> End
> Alter Table WorkLog Enable Trigger All

Row Cannot be Located for Update Error

Can anyone offer any suggetions as to what could be causing this error
in my ASP. Please dont mind the newbie code, I'm still pretty green
at this:
*******ERROR*******
Microsoft Cursor Engine error '80040e38'
Row cannot be located for updating. Some values may have been changed
since it was last read.
-- ASP Code Causing the Trouble --
strSQL = "SELECT * FROM WorkLog WHERE QuoteID = ""eID&" And stepID
= "&eventID
'Create the Recordset object and run SQL statement
Set logRS = Server.CreateObject ("ADODB.Recordset")
logRS.CursorLocation = adUseClient
logRS.Open strSQL, objConn,, adLockOptimistic
logRS("Completed") = True
logRS("CompletedBy") = secID
logRS("DateComplete") = Date()
logRS.Update <--ERROR HERE
'-- Trigger On Effected Table --
CREATE TRIGGER UpdateNextDue ON [dbo].[WorkLog]
FOR UPDATE
AS
Declare @.logID int,
@.quoteID int,
@.stepnum int,
@.userID int,
@.stepID int
Alter Table WorkLog Disable Trigger All
Set @.logID = (Select Log_ID From Inserted)
Set @.quoteID =( Select QuoteID From WorkLog Where Log_ID = @.logID)
Set @.stepID = (Select stepID From WorkLog Where Log_ID = @.logID)
Set @.stepNum =( Select Max(StepNum) From WorkLog Where quoteID =
@.quoteID And Completed = 1)
Set @.userID =( Select UserID From WorkLog Where quoteID = @.quoteID And
StepNum = @.stepnum + 1)
If @.stepID <> '65'
Begin
Update WorkLog
Set NextDue = 1
Where QuoteID = @.quoteID And
StepNum = @.stepnum + 1
Alter Table Quotes Disable Trigger All
Update Quotes
Set NextStep = @.userID
Where @.quoteID = quoteID
Alter Table Quotes Enable Trigger All
End
Alter Table WorkLog Enable Trigger All
How about instead of opening up a recordset, you just execute an UPDATE
statement?
objConn.Execute("UPDATE ... WHERE ...")
The error sounds like you don't have a primary key, or there's not enough
information to identify the row based on the primary key. Since you use
SELECT *, I'm assuming the former. Are you familiar with primary keys? Is
it possible that there is more than one row WHERE QuoteID = ""eID&" And
stepID
= "&eventID ?
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"belacyrf" <bela@.webnet-x.com> wrote in message
news:d0e7d44f.0405141126.20601f4@.posting.google.co m...
> Can anyone offer any suggetions as to what could be causing this error
> in my ASP. Please dont mind the newbie code, I'm still pretty green
> at this:
> *******ERROR*******
> Microsoft Cursor Engine error '80040e38'
> Row cannot be located for updating. Some values may have been changed
> since it was last read.
> -- ASP Code Causing the Trouble --
> strSQL = "SELECT * FROM WorkLog WHERE QuoteID = ""eID&" And stepID
> = "&eventID
> 'Create the Recordset object and run SQL statement
> Set logRS = Server.CreateObject ("ADODB.Recordset")
> logRS.CursorLocation = adUseClient
> logRS.Open strSQL, objConn,, adLockOptimistic
> logRS("Completed") = True
> logRS("CompletedBy") = secID
> logRS("DateComplete") = Date()
> logRS.Update <--ERROR HERE
> '-- Trigger On Effected Table --
> CREATE TRIGGER UpdateNextDue ON [dbo].[WorkLog]
> FOR UPDATE
> AS
> Declare @.logID int,
> @.quoteID int,
> @.stepnum int,
> @.userID int,
> @.stepID int
> Alter Table WorkLog Disable Trigger All
> Set @.logID = (Select Log_ID From Inserted)
> Set @.quoteID =( Select QuoteID From WorkLog Where Log_ID = @.logID)
> Set @.stepID = (Select stepID From WorkLog Where Log_ID = @.logID)
> Set @.stepNum =( Select Max(StepNum) From WorkLog Where quoteID =
> @.quoteID And Completed = 1)
> Set @.userID =( Select UserID From WorkLog Where quoteID = @.quoteID And
> StepNum = @.stepnum + 1)
> If @.stepID <> '65'
> Begin
> Update WorkLog
> Set NextDue = 1
> Where QuoteID = @.quoteID And
> StepNum = @.stepnum + 1
> Alter Table Quotes Disable Trigger All
> Update Quotes
> Set NextStep = @.userID
> Where @.quoteID = quoteID
> Alter Table Quotes Enable Trigger All
> End
> Alter Table WorkLog Enable Trigger All

Row Cannot be Located for Update Error

Can anyone offer any suggetions as to what could be causing this error
in my ASP. Please dont mind the newbie code, I'm still pretty green
at this:
*******ERROR*******
Microsoft Cursor Engine error '80040e38'
Row cannot be located for updating. Some values may have been changed
since it was last read.
-- ASP Code Causing the Trouble --
strSQL = "SELECT * FROM WorkLog WHERE QuoteID = ""eID&" And stepID
= "&eventID
'Create the Recordset object and run SQL statement
Set logRS = Server.CreateObject ("ADODB.Recordset")
logRS.CursorLocation = adUseClient
logRS.Open strSQL, objConn,, adLockOptimistic
logRS("Completed") = True
logRS("CompletedBy") = secID
logRS("DateComplete") = Date()
logRS.Update <--ERROR HERE
'-- Trigger On Effected Table --
CREATE TRIGGER UpdateNextDue ON [dbo].[WorkLog]
FOR UPDATE
AS
Declare @.logID int,
@.quoteID int,
@.stepnum int,
@.userID int,
@.stepID int
Alter Table WorkLog Disable Trigger All
Set @.logID = (Select Log_ID From Inserted)
Set @.quoteID =( Select QuoteID From WorkLog Where Log_ID = @.logID)
Set @.stepID = (Select stepID From WorkLog Where Log_ID = @.logID)
Set @.stepNum =( Select Max(StepNum) From WorkLog Where quoteID =
@.quoteID And Completed = 1)
Set @.userID =( Select UserID From WorkLog Where quoteID = @.quoteID And
StepNum = @.stepnum + 1)
If @.stepID <> '65'
Begin
Update WorkLog
Set NextDue = 1
Where QuoteID = @.quoteID And
StepNum = @.stepnum + 1
Alter Table Quotes Disable Trigger All
Update Quotes
Set NextStep = @.userID
Where @.quoteID = quoteID
Alter Table Quotes Enable Trigger All
End
Alter Table WorkLog Enable Trigger AllHow about instead of opening up a recordset, you just execute an UPDATE
statement?
objConn.Execute("UPDATE ... WHERE ...")
The error sounds like you don't have a primary key, or there's not enough
information to identify the row based on the primary key. Since you use
SELECT *, I'm assuming the former. Are you familiar with primary keys? Is
it possible that there is more than one row WHERE QuoteID = ""eID&" And
stepID
= "&eventID ?
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"belacyrf" <bela@.webnet-x.com> wrote in message
news:d0e7d44f.0405141126.20601f4@.posting.google.com...
> Can anyone offer any suggetions as to what could be causing this error
> in my ASP. Please dont mind the newbie code, I'm still pretty green
> at this:
> *******ERROR*******
> Microsoft Cursor Engine error '80040e38'
> Row cannot be located for updating. Some values may have been changed
> since it was last read.
> -- ASP Code Causing the Trouble --
> strSQL = "SELECT * FROM WorkLog WHERE QuoteID = ""eID&" And stepID
> = "&eventID
> 'Create the Recordset object and run SQL statement
> Set logRS = Server.CreateObject ("ADODB.Recordset")
> logRS.CursorLocation = adUseClient
> logRS.Open strSQL, objConn,, adLockOptimistic
> logRS("Completed") = True
> logRS("CompletedBy") = secID
> logRS("DateComplete") = Date()
> logRS.Update <--ERROR HERE
> '-- Trigger On Effected Table --
> CREATE TRIGGER UpdateNextDue ON [dbo].[WorkLog]
> FOR UPDATE
> AS
> Declare @.logID int,
> @.quoteID int,
> @.stepnum int,
> @.userID int,
> @.stepID int
> Alter Table WorkLog Disable Trigger All
> Set @.logID = (Select Log_ID From Inserted)
> Set @.quoteID =( Select QuoteID From WorkLog Where Log_ID = @.logID)
> Set @.stepID = (Select stepID From WorkLog Where Log_ID = @.logID)
> Set @.stepNum =( Select Max(StepNum) From WorkLog Where quoteID =
> @.quoteID And Completed = 1)
> Set @.userID =( Select UserID From WorkLog Where quoteID = @.quoteID And
> StepNum = @.stepnum + 1)
> If @.stepID <> '65'
> Begin
> Update WorkLog
> Set NextDue = 1
> Where QuoteID = @.quoteID And
> StepNum = @.stepnum + 1
> Alter Table Quotes Disable Trigger All
> Update Quotes
> Set NextStep = @.userID
> Where @.quoteID = quoteID
> Alter Table Quotes Enable Trigger All
> End
> Alter Table WorkLog Enable Trigger All