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

Lists: pgsql-odbc
From: Andreas <maps(dot)on(at)gmx(dot)net>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Access complains : Update or CancelUpdate without AddNew or Edit
Date: 2008-03-20 17:20:39
Message-ID: 47E29CE7.2040103@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

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?


From: "Richard Broersma" <richard(dot)broersma(at)gmail(dot)com>
To: Andreas <maps(dot)on(at)gmx(dot)net>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Access complains : Update or CancelUpdate without AddNew or Edit
Date: 2008-03-21 05:08:53
Message-ID: 396486430803202208k656417b4jd917034c320b09e6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

On Thu, Mar 20, 2008 at 10:20 AM, Andreas <maps(dot)on(at)gmx(dot)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.


From: Andreas <maps(dot)on(at)gmx(dot)net>
To: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Access complains : Update or CancelUpdate without AddNew or Edit
Date: 2008-03-21 11:49:46
Message-ID: 47E3A0DA.1050002@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

Richard Broersma schrieb:
> On Thu, Mar 20, 2008 at 10:20 AM, Andreas <maps(dot)on(at)gmx(dot)net
> <mailto:maps(dot)on(at)gmx(dot)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


From: "Fred Parkinson" <FredP(at)abag(dot)ca(dot)gov>
To: "Andreas" <maps(dot)on(at)gmx(dot)net>, <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Access complains : Update or CancelUpdate without AddNew or Edit
Date: 2008-03-21 17:27:03
Message-ID: 47E38D77020000A7000071C4@groupwise.abag.ca.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

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' without even knowing it? Perhaps they are starting a new record without knowing it, and not including information required by a record before they attempt to navigate away to another record?

>>> Andreas <maps(dot)on(at)gmx(dot)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?


From: "Richard Broersma" <richard(dot)broersma(at)gmail(dot)com>
To: "Fred Parkinson" <FredP(at)abag(dot)ca(dot)gov>
Cc: Andreas <maps(dot)on(at)gmx(dot)net>, pgsql-odbc(at)postgresql(dot)org
Subject: Re: Access complains : Update or CancelUpdate without AddNew or Edit
Date: 2008-03-21 19:53:50
Message-ID: 396486430803211253t2fa7ae39sf6641f67887ec943@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

On 3/21/08, Fred Parkinson <FredP(at)abag(dot)ca(dot)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.


From: "Richard Broersma" <richard(dot)broersma(at)gmail(dot)com>
To: Andreas <maps(dot)on(at)gmx(dot)net>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Access complains : Update or CancelUpdate without AddNew or Edit
Date: 2008-03-25 19:56:03
Message-ID: 396486430803251256r4bcf3e8bgb2ce0c7962c99260@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

On Fri, Mar 21, 2008 at 4:49 AM, Andreas <maps(dot)on(at)gmx(dot)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.