No Delete of first try

No Delete of first try

Post by Geof » Wed, 29 Jan 2003 12:21:38



I still cant get the hang of the way it swings so hope someone can help me
with,
I cant delete the record displayed when my form loads
it gives an error:-
Committed:Delete
Error Status 1
Complete:Update
Error Status 2
Error StatusRow handle referred to a deleted row or a row marked for
deletion.
yet if I move or add then the delete works fine.
If I cancel it on error and resume then try again it comes up trumps.
Any pointers ?
TIA
--Geoff
 
 
 

No Delete of first try

Post by Val Mazu » Wed, 29 Jan 2003 22:12:13


Geoff,

How do you get that error? Could you be more specific in your steps?

--
Val Mazur
Microsoft MVP


Quote:> I still cant get the hang of the way it swings so hope someone can help me
> with,
> I cant delete the record displayed when my form loads
> it gives an error:-
> Committed:Delete
> Error Status 1
> Complete:Update
> Error Status 2
> Error StatusRow handle referred to a deleted row or a row marked for
> deletion.
> yet if I move or add then the delete works fine.
> If I cancel it on error and resume then try again it comes up trumps.
> Any pointers ?
> TIA
> --Geoff


 
 
 

No Delete of first try

Post by Geof » Thu, 30 Jan 2003 09:48:13


Hi Val,
I will step through what I know
When I issue the delete I get an error in the subs on error from ADO

I have a #IF debug routine that reports the RS's events.When I do a delete
after opening the RS & my form I get:-
-----------
Will Delete Employees
 Status OK
Complete Delete
-----------
Will Update Employees
 Status OK
Complete Update

(This is the point where I get a modal error dialog in the subs error trap:
Multiple-step operation generated errors.Check each status value)
I press OK here, and then the events continue with the status value

 ERROR !!
Row handle referred to a deleted row or a row marked for deletion.

(because of the error my sub issues a RS.cancelupdate resume next, so gives
this)

-----------
Will UNDO Delete Employees
 Status OK
Complete UNDO Delete
-----------
Will First Change Employees
(What is this about ???)
 Status OK
Complete FirstChange
-----------
Will Update Employees
 Status OK
Complete Update

If I repeat the delete now it deletes without a hitch.

I have noticed  that if I move the rs first then it works fine
and just noticed if I filter out the move events it
leaves me with this:-
-----------
Will First Change Employees
 Status OK
Complete FirstChange
-----------
Will Update Employees
 Status OK
Complete Update

The same actions that seems to correct it when I cancel the error, so it
must
be this FirstChange that is putting me in the correct mode.
Do you know what this first change is, and if I should be doing something
when I open my form so I can delete straight away if required ?
Thanks
Geoff
--


> Geoff,

> How do you get that error? Could you be more specific in your steps?

> --
> Val Mazur
> Microsoft MVP



> > I still cant get the hang of the way it swings so hope someone can help
me
> > with,
> > I cant delete the record displayed when my form loads
> > it gives an error:-
> > Committed:Delete
> > Error Status 1
> > Complete:Update
> > Error Status 2
> > Error StatusRow handle referred to a deleted row or a row marked for
> > deletion.
> > yet if I move or add then the delete works fine.
> > If I cancel it on error and resume then try again it comes up trumps.
> > Any pointers ?
> > TIA
> > --Geoff

 
 
 

No Delete of first try

Post by Val Mazu » Thu, 30 Jan 2003 23:49:25


Geoff,

You could get that error in two cases. First if you do not have primary key
on that table or primary key field(s) is/are not included into your SELECT
statement. Second, you could get error if you are using incompatible types
in WHERE clauses. Like when you try to compare string with numeric value

--
Val Mazur
Microsoft MVP


> Hi Val,
> I will step through what I know
> When I issue the delete I get an error in the subs on error from ADO

> I have a #IF debug routine that reports the RS's events.When I do a delete
> after opening the RS & my form I get:-
> -----------
> Will Delete Employees
>  Status OK
> Complete Delete
> -----------
> Will Update Employees
>  Status OK
> Complete Update

> (This is the point where I get a modal error dialog in the subs error
trap:
> Multiple-step operation generated errors.Check each status value)
> I press OK here, and then the events continue with the status value

>  ERROR !!
> Row handle referred to a deleted row or a row marked for deletion.

> (because of the error my sub issues a RS.cancelupdate resume next, so
gives
> this)

> -----------
> Will UNDO Delete Employees
>  Status OK
> Complete UNDO Delete
> -----------
> Will First Change Employees
> (What is this about ???)
>  Status OK
> Complete FirstChange
> -----------
> Will Update Employees
>  Status OK
> Complete Update

> If I repeat the delete now it deletes without a hitch.

> I have noticed  that if I move the rs first then it works fine
> and just noticed if I filter out the move events it
> leaves me with this:-
> -----------
> Will First Change Employees
>  Status OK
> Complete FirstChange
> -----------
> Will Update Employees
>  Status OK
> Complete Update

> The same actions that seems to correct it when I cancel the error, so it
> must
> be this FirstChange that is putting me in the correct mode.
> Do you know what this first change is, and if I should be doing something
> when I open my form so I can delete straight away if required ?
> Thanks
> Geoff
> --



> > Geoff,

> > How do you get that error? Could you be more specific in your steps?

> > --
> > Val Mazur
> > Microsoft MVP



> > > I still cant get the hang of the way it swings so hope someone can
help
> me
> > > with,
> > > I cant delete the record displayed when my form loads
> > > it gives an error:-
> > > Committed:Delete
> > > Error Status 1
> > > Complete:Update
> > > Error Status 2
> > > Error StatusRow handle referred to a deleted row or a row marked for
> > > deletion.
> > > yet if I move or add then the delete works fine.
> > > If I cancel it on error and resume then try again it comes up trumps.
> > > Any pointers ?
> > > TIA
> > > --Geoff

 
 
 

No Delete of first try

Post by Geof » Fri, 31 Jan 2003 10:29:04


Hi Val,
I am returning 2 full tables inc. primary keys.
I have checked the data types all seems well.
I am thinking it could be a combo box that does not give me the required
status once the form has loaded, even though the first record is shown a
movefirst seems to cure it,
at least now I have a solution, I can dig deeper at a later date.
Thanks for the info.
Appreciate your help
Geoff
--


> Geoff,

> You could get that error in two cases. First if you do not have primary
key
> on that table or primary key field(s) is/are not included into your SELECT
> statement. Second, you could get error if you are using incompatible types
> in WHERE clauses. Like when you try to compare string with numeric value

> --
> Val Mazur
> Microsoft MVP



> > Hi Val,
> > I will step through what I know
> > When I issue the delete I get an error in the subs on error from ADO

> > I have a #IF debug routine that reports the RS's events.When I do a
delete
> > after opening the RS & my form I get:-
> > -----------
> > Will Delete Employees
> >  Status OK
> > Complete Delete
> > -----------
> > Will Update Employees
> >  Status OK
> > Complete Update

> > (This is the point where I get a modal error dialog in the subs error
> trap:
> > Multiple-step operation generated errors.Check each status value)
> > I press OK here, and then the events continue with the status value

> >  ERROR !!
> > Row handle referred to a deleted row or a row marked for deletion.

> > (because of the error my sub issues a RS.cancelupdate resume next, so
> gives
> > this)

> > -----------
> > Will UNDO Delete Employees
> >  Status OK
> > Complete UNDO Delete
> > -----------
> > Will First Change Employees
> > (What is this about ???)
> >  Status OK
> > Complete FirstChange
> > -----------
> > Will Update Employees
> >  Status OK
> > Complete Update

> > If I repeat the delete now it deletes without a hitch.

> > I have noticed  that if I move the rs first then it works fine
> > and just noticed if I filter out the move events it
> > leaves me with this:-
> > -----------
> > Will First Change Employees
> >  Status OK
> > Complete FirstChange
> > -----------
> > Will Update Employees
> >  Status OK
> > Complete Update

> > The same actions that seems to correct it when I cancel the error, so it
> > must
> > be this FirstChange that is putting me in the correct mode.
> > Do you know what this first change is, and if I should be doing
something
> > when I open my form so I can delete straight away if required ?
> > Thanks
> > Geoff
> > --



> > > Geoff,

> > > How do you get that error? Could you be more specific in your steps?

> > > --
> > > Val Mazur
> > > Microsoft MVP



> > > > I still cant get the hang of the way it swings so hope someone can
> help
> > me
> > > > with,
> > > > I cant delete the record displayed when my form loads
> > > > it gives an error:-
> > > > Committed:Delete
> > > > Error Status 1
> > > > Complete:Update
> > > > Error Status 2
> > > > Error StatusRow handle referred to a deleted row or a row marked for
> > > > deletion.
> > > > yet if I move or add then the delete works fine.
> > > > If I cancel it on error and resume then try again it comes up
trumps.
> > > > Any pointers ?
> > > > TIA
> > > > --Geoff

 
 
 

1. Distributed Transaction Failing on First Try, Second Try Works

I wrote a procedure. I run this procedure on SQL Server 2000 box.

In the procedure I'm selecting data into cursor from the second SQL Server 2000 box.

And then I'm inserting this data into the table in the first SQL box.

Here is an error:

        Server: Msg 7391, Level 16, State 1, Procedure sp_SK_Investment_Trans_new_db, Line 51

        The operation could not be performed because the OLE DB provider 'SQLOLEDB'

        was unable to begin a distributed transaction.

        Remote tables are not updatable. Updatable keyset-driven cursors on remote

        tables require a transaction with the REPEATABLE_READ or SERIALIZABLE

        isolation level spanning the cursor.

        [OLE/DB provider returned message: New transaction cannot enlist in the

        specified transaction coordinator. ]

I did a research on Microsoft website and in Internet but the cases with the

same error were different from mine.

When I run this very simple procedure first time usually I receive an error.

If I run it second time it always works. it's very strange random behavior.

I've checked that:

1. MS DTC started on both servers

2. Linked server is added

3. User's permission to access the particular database is given.

And actually I even tried to do everything as "sa". Didn't help.

I need to run this procedure on a schedule basis.

For second part of error ( about REPEATABLE_READ or SERIALIZABLE isolation level):

1. I don't update remote table at all and don't understand why I have this error.

2. I've added

        SET XACT_ABORT ON

   and

        SET TRANSACTION ISOLATION LEVEL  SERIALIZABLE

   into my procedure and run it again. The results was the same but with out

   this second part of error. But I removed these rows from the procedure because

   this transaction hang and other people couldn't do anything with a table on the

   first box ( I had a commit sentence at the end of procedure).

As I said the procedure is very simple.

I would really appreciate your help and thoughts

2. How does SqlServer implement Foreign Keys?

3. I'm Trying this New CAM for the First Time 1984

4. Rs.AbsolutePosition not setting correctly

5. I'm Trying this New CAM for the First Time 3524

6. trace flag 1204

7. Can't establish connection for the first try

8. problem with UPDATE Command

9. I'm Trying this New CAM for the First Time 3524

10. client machines connections fail on first try

11. Need help, first time trying to us databases with vb6

12. I'm Trying this New CAM for the First Time 3524

13. Trying to create my first SP - having trouble