Access complains : Update or CancelUpdate without AddNew or Edit

Access complains : Update or CancelUpdate without AddNew or Edit

am 20.03.2008 18:20:39 von Andreas

Hi,

I've build an application with Access 2000/2003 that uses a remote PG
8.2.6 via SSH tunnel.
The forms have bound controls and usually work decently.

But now and then a user reports a error (I have to translate):
.... event before update caused an error:
Update or CancelUpdate without AddNew or Edit

They say they dont do anything special. Just clicking a checkbox or
trying to jump to the next record would do to trigger the error.
Later the same action won't cause any trouble, so I can't crack this in
debug-mode. Here on my box it always works as expected.

The error appears daily so the productive folks get annoyed but I have
no idea where to look. :(

Could someone here give a hint?

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Access complains : Update or CancelUpdate without AddNew or Edit

am 21.03.2008 06:08:53 von Richard Broersma

------=_Part_5212_28795547.1206076133660
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Thu, Mar 20, 2008 at 10:20 AM, Andreas wrote:


> ... event before update caused an error:
> Update or CancelUpdate without AddNew or Edit


This sounds more like a MS-Access Visual Basic Coding problem. Any ODBC
related error messages are really PostgreSQL error messages that are relayed
to you. What you are describing here doesn't sound any thing like and ODBC
or PostgreSQL error.

They say they dont do anything special. Just clicking a checkbox or
> trying to jump to the next record would do to trigger the error.
> Later the same action won't cause any trouble, so I can't crack this in
> debug-mode. Here on my box it always works as expected.
>

How are you binding the form to the user controls? Are you linking from
linked tables, linked DAO recordsets, or linked ADO recordsets?

Could someone here give a hint?
>


I would start by looking for code in the form that might be calling the
form's recordset UPDATE or CancelUpdate method.

Also, if this is a access problem, I would check out this site for further
information: www.utteraccess.com

Regards,
Richard Broersma Jr.

------=_Part_5212_28795547.1206076133660
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Thu, Mar 20, 2008 at 10:20 AM, Andreas <> wrote:

 

.... event before update caused an error:

Update or CancelUpdate without AddNew or Edit

This sounds more like a MS-Access Visual Basic Coding problem.  Any ODBC related error messages are really PostgreSQL error messages that are relayed to you.   What you are describing here doesn't sound any thing like and ODBC or PostgreSQL error.



They say they dont do anything special. Just clicking a checkbox or

trying to jump to the next record would do to trigger the error.

Later the same action won't cause any trouble, so I can't crack this in

debug-mode. Here on my box it always works as expected.

 
How are you binding the form to the user controls?  Are you linking from linked tables, linked DAO recordsets, or linked ADO recordsets?



Could someone here give a hint?



I would start by looking for code in the form that might be calling the form's recordset UPDATE or CancelUpdate method. 

Also,  if this is a access problem, I would check out this site for further information: 


Regards,
Richard Broersma Jr.


------=_Part_5212_28795547.1206076133660--

Re: Access complains : Update or CancelUpdate without AddNewor Edit

am 21.03.2008 12:49:46 von Andreas

Richard Broersma schrieb:
> On Thu, Mar 20, 2008 at 10:20 AM, Andreas > > wrote:
>
>
> ... event before update caused an error:
> Update or CancelUpdate without AddNew or Edit
>
>
> This sounds more like a MS-Access Visual Basic Coding problem. Any
> ODBC related error messages are really PostgreSQL error messages that
> are relayed to you. What you are describing here doesn't sound any
> thing like and ODBC or PostgreSQL error.
I think it's an Access issue, too, but one that is ODBC related as I
never had this problem without ODBC.
I don't say it is a pgsqlODBC specific error.
I hoped someone here ran into it before and knows a tweak for psqlODBC,
Access or anything to improve this thing.

It's not a VBA coding issue, since the whole data update is done by
Access and the form that is bound to linked in tables.
No ADO-, DAO recordset stuff within my code here.

This form actually has a "before Update" procedure but it just inserts
the current User-ID when the form was changed.
This happens everytime an update occurs and works perfectly next to
everytime it is called.


Regards
Andreas

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Access complains : Update or CancelUpdate without

am 21.03.2008 18:27:03 von Fred Parkinson

Just shooting in the dark, but do you have the Access form property 'allow =
additions' set to 'yes', and could a user navigate to the 'new record' with=
out even knowing it? Perhaps they are starting a new record without knowin=
g it, and not including information required by a record before they attemp=
t to navigate away to another record?

>>> Andreas 03/20/2008 10:20 AM >>>
Hi,

I've build an application with Access 2000/2003 that uses a remote PG=20
8.2.6 via SSH tunnel.
The forms have bound controls and usually work decently.

But now and then a user reports a error (I have to translate):
... event before update caused an error:
Update or CancelUpdate without AddNew or Edit

They say they dont do anything special. Just clicking a checkbox or=20
trying to jump to the next record would do to trigger the error.
Later the same action won't cause any trouble, so I can't crack this in=20
debug-mode. Here on my box it always works as expected.

The error appears daily so the productive folks get annoyed but I have=20
no idea where to look. :(

Could someone here give a hint?

--=20
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc=20



--=20
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Access complains : Update or CancelUpdate without AddNew or Edit

am 21.03.2008 20:53:50 von Richard Broersma

------=_Part_8127_29625515.1206129230537
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 3/21/08, Fred Parkinson wrote:
>
> But now and then a user reports a error (I have to translate):
> .. event before update caused an error:
> Update or CancelUpdate without AddNew or Edit


I've only seen this error in MS-Access when I've done one of two things:

I've tried up manually update or cancel an update to a record (in a
recordset object) that wasn't already opened for editing or opened as a
newly created record.

This should be the only way that this error message should be raised.

I would use the DEBUG find utility to search all of you form's code for
any instances where the DAO recordset methods are being used to update your
form's recordset object.

I would bet that user is able to call one of these methods via the form's
control's event procedures at an unexpected time when the record has not
recieved any changed from the user.

Regards,
Richard Broersma Jr.

------=_Part_8127_29625515.1206129230537
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 3/21/08, Fred Parkinson <> wrote:
But now and then a user reports a error (I have to translate):
.. event before update caused an error:

Update or CancelUpdate without AddNew or Edit

 

I've only seen this error in MS-Access when I've done one of two things:

 

I've tried up manually update or cancel an update to a record (in a recordset object) that wasn't already opened for editing or opened as a newly created record.

 

This should be the only way that this error message should be raised.

 

I would use the DEBUG find utility to search all of you form's code for any instances where the DAO recordset methods are being used to update your form's recordset object.

 

I would bet that user is able to call one of these methods via the form's control's event procedures at an unexpected time when the record has not recieved any changed from the user.

 

Regards,

Richard Broersma Jr.

 


------=_Part_8127_29625515.1206129230537--

Re: Access complains : Update or CancelUpdate without AddNew or Edit

am 25.03.2008 20:56:03 von Richard Broersma

On Fri, Mar 21, 2008 at 4:49 AM, Andreas wrote:
> I think it's an Access issue, too, but one that is ODBC related as I
> never had this problem without ODBC.
> I don't say it is a pgsqlODBC specific error.
> I hoped someone here ran into it before and knows a tweak for psqlODBC,
> Access or anything to improve this thing.
>
> This form actually has a "before Update" procedure but it just inserts
> the current User-ID when the form was changed.
> This happens everytime an update occurs and works perfectly next to
> everytime it is called.

Andreas,

If you haven't solved you problem yet, you might want to following
this thread to see if it provides a solution to your problem:
http://www.utteraccess.com/forums/showflat.php?Board=83&Numb er=1616206

Regards,
Richard Broersma Jr.

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc