I encountered this error intermittently when child bizobj requeried or when I added a new child record.
Error: 1547
Message: Cannot insert an empty row from a view into its base table(s).
This view has a WHERE custno == ?vp_custno clause.
Please be my mentor.
FCua
Author: James Sayer
Posted: 2000-09-20 12:25:46 Link
Greetings All,
This post is informational regarding the error 1547, we spent some time researching this issue and found no good advice here on the forum or elsewhere. Perhaps these notes will help the next person.
This error condition was encountered when testing the data environment prior to completed programming. As a result some of the errors were introduced because the programming was not complete. But this isn't shocking when you consider that many people program in stages: get it working first, then add some value, then finish per client whims. <g>
First some background about the scheme, then reasoning for error:
We are using VFP views from VFP tables. We want to present a list of items to users that is customized for their site and where any item can be displayed for many sites. To do this we have a parent-child scheme:
parent.cid -->> | child.cid
parent.cItem | child.cidParent
parent.tEffective | child.cSite
The view has a parameter on the child.cSite value and that one field from the child table is included in the view. So the view that is used by the bizobj is all from the parent table with one field from the child table.
The view uses Optimistic Record Buffering. No indices on the view.
The child field is marked as not updatable.
All parent fields are updatable.
Now the testing part:
What we noticed in testing the data environment is that we could add a new record to the view without error, but if the record pointer is moved, error 1547 is generated.
The simple solution is to place a value into the one field from the child table. Then the pointer can move.
Reasoning:
Who know why VFP does anything that it does? "It works that way" may be the best reasoning available. To handle this issue what we have done is place code in the bizobj.OnNew() to populate that child field with the proper default value. Problem solved. The child table is open because it provides data for the view, but no data is updated in that table. Still it appears that the error is coming from the child base table.
I hope this helps the next person get an early start on their debugging.
James Sayer
Author: Ed Leafe
Posted: 2000-09-21 08:38:23 Link
<i><font color="#663300">The view uses Optimistic Record Buffering. No indices on the view.
The child field is marked as not updatable.
All parent fields are updatable.
Now the testing part:
What we noticed in testing the data environment is that we could add a new record to the view without error, but if the record pointer is moved, error 1547 is generated.
The simple solution is to place a value into the one field from the child table. Then the pointer can move. </font></i>
I'm not sure I follow. Why is the pointer being moved? Why do you want to save a blank row to the table? Why don't you use table buffering?
Also, why isn't <b>IsNewAndEmpty()</b> being called during pointer movement? That should take care of the "cannot insert empty row" problem.
<font color="#cc0000"> ___/
/
__/
/
____/</font>
Ed Leafe
Author: Gustavo Alfredo Schweitzer
Posted: 2002-01-08 16:36:51 Link
This happens to me all the time and I don't know the reason. Some methods of my business objects appear in the Properties Window with its second column in italics. When I dobleclick on it, of course nothing happens.
One of the problems this causes to me is that I can't insert code in the ONNEW method to fill some fields with default values.
I'm sure I'm missing some basic knoledge here...
Somebody help me please.
Gustavo A. Schweitzer
Strategic Business Technology, Inc.
Miami FL, USA
<i><font color="#663300">This happens to me all the time and I don't know the reason. Some methods of my business objects appear in the Properties Window with its second column in italics. When I dobleclick on it, of course nothing happens.
One of the problems this causes to me is that I can't insert code in the ONNEW method to fill some fields with default values.</font></i>
This sounds like you are trying to edit the bizobj instance on the form, and not the class itself. Since the methods in Italic are marked as Protected, you cannot edit their instance code. Close the form, and open up the bizobj in the aBizness classlib. Make your OnNew() changes there.
<font color="#cc0000"> ___/
/
__/
/
____/</font>
Ed Leafe
Author: Gustavo Alfredo Schweitzer
Posted: 2002-01-08 17:36:03 Link
Gotcha!
Thank you Ed!
<i><font color="#663300"><i><font color="#663300">This happens to me all the time and I don't know the reason. Some methods of my business objects appear in the Properties Window with its second column in italics. When I dobleclick on it, of course nothing happens.
One of the problems this causes to me is that I can't insert code in the ONNEW method to fill some fields with default values.</font></i>
This sounds like you are trying to edit the bizobj instance on the form, and not the class itself. Since the methods in Italic are marked as Protected, you cannot edit their instance code. Close the form, and open up the bizobj in the aBizness classlib. Make your OnNew() changes there.
</font></i>
Gustavo A. Schweitzer
Strategic Business Technology, Inc.
Miami FL, USA
When I attempt to insert blank on a table opened exclusive with VFP9 I get
error message..
INSERT cannot be issued when row or table buffering is enabled or when
integrity constraints are in effect.
I have not set any buffering or integrity constraints
How do I get past this, I need to add a row in my table.
Thanks Jerry
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/84945E560BBC4C69AB012DC412C81751@jerryfootePC
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
On Thu, Mar 1, 2012 at 1:11 PM, Jerry Foote <jerryfoote@bellsouth.net> wrote:
> When I attempt to insert blank on a table opened exclusive with VFP9 I get
> error message..
>
> INSERT cannot be issued when row or table buffering is enabled or when
> integrity constraints are in effect.
>
-----------------
You probably have :
integrity constraints are in effect.
Primary key probably not but FKey to other table is what might be biting you.
--
Stephen Russell
901.246-0159 cell
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAJidMYLxq6uyLRu=APQn-5efG2vUhxVh7=xjaJHeXrDQW7Oq5Q@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
-----Original Message-----
From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On Behalf
Of Stephen Russell
Sent: Thursday, March 01, 2012 1:32 PM
To: ProFox Email List
Subject: Re: Cannot Insert
On Thu, Mar 1, 2012 at 1:11 PM, Jerry Foote <jerryfoote@bellsouth.net>
wrote:
> When I attempt to insert blank on a table opened exclusive with VFP9 I
get
> error message..
>
> INSERT cannot be issued when row or table buffering is enabled or when
> integrity constraints are in effect.
>
>-----------------
>
>You probably have :
>
> integrity constraints are in effect.
>
>Primary key probably not but FKey to other table is what might be biting
>you.
>--
>Stephen Russell
>901.246-0159 cell
I deleted the indexes I had on the file and I was able to insert.
Thanks Jerry
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/10FAF4630D504D00B2F6CBFBC8D0F6A8@jerryfootePC
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Jerry
pay attention to this point : if you have a primary key, you can do an INSERT
BLANK but if you leave this record blank, you can't add another one because you
can't have two 'blank' keys.
HTH
The Foxil
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/4F4FDE8F.6060209@wanadoo.fr
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.