Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] WF Maintain -- INCLUDE-ing Records Into a Table That Auto-Generates Keys

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] WF Maintain -- INCLUDE-ing Records Into a Table That Auto-Generates Keys
 Login/Join
 
Virtuoso
posted
I'm working with a guy that's trying to insert records via a Maintain form into a view that auto-generates its key values. The key is an integer. When he attempts to perform the include with no value in the key field, he gets

(FOC1400) SQLCODE IS 544 (HEX: 00000220) XOPEN: 23000
: Microsoft SQL Native Client: [23000] Cannot insert explicit value for id
: entity column in table 'staff' when IDENTITY_INSERT is set to OFF.
(FOC1740) EXECUTE ERROR : VSTAFFADD

He'd like to utilize the db's auto-key-generator feature. Is this possible, and if it is, what's the secret?

J.

This message has been edited. Last edited by: Kerry,



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Gold member
posted Hide Post
John,

Can you include the code for the maintain? It will help a lot in working with you to debug your issue.

Thanks


Eric Woerle
WF 7.6.7 Reportting Server
ETL 7.6.10
Dev Studio 7.6.7
 
Posts: 95 | Registered: July 31, 2007Report This Post
Virtuoso
posted Hide Post
.

Not a lot of complexity to the Maintain code --

for all Include VSTAFFADD.VSTAFFADD.EMPLOYED
VSTAFFADD.VSTAFFADD.LAST_NAME
VSTAFFADD.VSTAFFADD.GIVEN_NAME
VSTAFFADD.VSTAFFADD.INITIALS
VSTAFFADD.VSTAFFADD.FULL_NAME
VSTAFFADD.VSTAFFADD.MAIL
VSTAFFADD.VSTAFFADD.USERNAME
VSTAFFADD.VSTAFFADD.TELEPHONE
VSTAFFADD.VSTAFFADD.TITLE
from addStaffStk;

Note that the key value is not included in this version, but he's tried both. Add VSTAFFADD.VSTAFFADD.EMP_KEY at the top and you're there.

My guess is that the Stack is assuming a key value of 0 and sending it. We adjusted the master file to allow the key to be missing=on and then computed a missing value in it explicitly prior to the INCLUDE but that made no difference.

J.


.



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Virtuoso
posted Hide Post
.


Update -- magic, it's running.

On examining the master file, setting the key field to FIELDTYPE=R seems to suppress the sending of the key value entirely.

We're not exactly sure how things changed to make it work, but we're not going the belabor the point.

J.


.



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Master
posted Hide Post
Hey John
We actually do document this:

http://documentation.informati..._snf_520/10snf10.htm

Basically just omit the ReadOnly key field from the Include line.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Expert
posted Hide Post
The other option is to have two masters, one with all the fields, and the other without the auto generated fields.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] WF Maintain -- INCLUDE-ing Records Into a Table That Auto-Generates Keys

Copyright © 1996-2020 Information Builders