You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

Issue Inserting Data

2 replies [Last post]
Guest's picture
Guest

Hello,
I am new to PeopleSoft dev.

I am have a test screen i am using to build this with a simple button. When I click the button i have the following code firing:

Local NDC_EX_CONUS:NDC_EX_CONUS &teeter;
Local number &steeter;
&teeter = &aConusData [2];
WinMessage(&steeter);
SQLExec(&teeter.WriteEXLocation(3));
WinMessage("ga ga : " | &steeter);
WinMessage("Length of array of conus extracts: " | &aConusData.Len);

The error I get is happening at the SQLExec. Here is what the writeexlocation method code is:
method WriteEXLocation
/+ &num3 as Number +/
/+ Returns String +/
Local string &sSQL;
&sSQL = "Insert into PS_EX_LOC_TBL_TMP (SETID, TXN_LOCATION, EFFDT, EFF_STATUS, TXN_LOCATION_GRP, DESCR, DESCRSHORT, COUNTRY, STATE, SYNCID, SYNCDTTM) VALUES ('blaha', '00001', '2010-04-02', 'A', '', 'MAY(MPCG)', 'MAY', 'USA', 'CA', '', '')";
REM SQLExec("Insert into PS_EX_LOC_TBL_TMP VALUES ('HIED1', '00001', '2010-04-22', 'A', '', 'MAYVILLE (MPCG)', 'MAYVILLE', :1, 'ND', '', '')", "CNS");
Return &sSQL;
end-method;

Here is the error:

A PeopleCode program tried to issue the indicated message while an SQL cursor is open. The message is invalid because it requires user input.

Review the PeopleCode and either move the message to a place where it will be issued during user "think-time", or change the "style" so no choice is required.

Any idea why i am getting this. I am not asking for user input so I don't know what this error is referring?

Any help you could provide would be great. Thanks for the help.

Rekha's picture
Rekha (not verified)
Re: Issue Inserting Data

Hi

Remove the Winmessages written in the code and try, this should solve the problem.

Rekha

Guest's picture
Guest (not verified)
Re: Issue Inserting Data

That was exactly the problem. thank you for the help. Can you explain why this is the case as it worked fine with the winmessages there until I created that method in my app class.

without the winmessages how would you debug this sort of stuff? We don't have the debugging feature enabled so I can't use that.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
The question below is to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.