Обсуждение: Access complains : Update or CancelUpdate without AddNew or Edit

Поиск
Список
Период
Сортировка

Access complains : Update or CancelUpdate without AddNew or Edit

От
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?

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

От
"Richard Broersma"
Дата:
On Thu, Mar 20, 2008 at 10:20 AM, Andreas <maps.on@gmx.net> 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.

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

От
Andreas
Дата:
Richard Broersma schrieb:
> On Thu, Mar 20, 2008 at 10:20 AM, Andreas <maps.on@gmx.net
> <mailto:maps.on@gmx.net>> 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

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

От
"Fred Parkinson"
Дата:
Just shooting in the dark, but do you have the Access form property 'allow additions' set to 'yes', and could a user
navigateto the 'new record' without even knowing it?  Perhaps they are starting a new record without knowing it, and
notincluding information required by a record before they attempt to navigate away to another record? 

>>> Andreas <maps.on@gmx.net> 03/20/2008 10:20 AM >>>
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

От
"Richard Broersma"
Дата:
On 3/21/08, Fred Parkinson <FredP@abag.ca.gov> 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.
 

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

От
"Richard Broersma"
Дата:
On Fri, Mar 21, 2008 at 4:49 AM, Andreas <maps.on@gmx.net> 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&Number=1616206

Regards,
Richard Broersma Jr.