Subject | select SP & KeyLinks problem |
---|---|
Author | Gediminas |
Post date | 2003-11-20T12:59:49Z |
Got the problem with the select SP, it's code:
CREATE PROCEDURE SP_SELECT_TEISEJAI
RETURNS ( TEISEJO_ID DECIMAL (15, 0), VARDAS VARCHAR (24), PAVARDE
VARCHAR (24), LYTIS SMALLINT, GIMIMO_DATA DATE, MIESTAS VARCHAR (24),
SALIS VARCHAR (24))
AS
BEGIN
for select t."Teisejo_ID" , z."Vardas", z."Pavarde", z."Lytis",
z."Gimimo_data", z."Miestas", z."Salis"
from TEISEJAI t
join ZMONES z
on t."Zmogaus_ID"=z."Zmogaus_ID"
into :Teisejo_ID, :Vardas, :Pavarde, :Lytis, :Gimimo_data, :Miestas,
:Salis
do
SUSPEND;
END
queries SQL code: select * from SP_SELECT_TEISEJAI;
KeyLinks set to "Teisejo_ID" (as it's a PK in a TEISEJAI table), but
when try to prepare statement, got warning, that "Blank SQL statement
is not allowed" (in other cases warning is that invalid KeyLinks
entry: "Teisejo_ID" - why?), but prepared parameter turns to true.
When I open dataset, again got several such warnings, but records are
fetched. Suspect, that select SP is bad, but can't find an error
If SP raises exception, SUSPEND is needed or not?
Gediminas
CREATE PROCEDURE SP_SELECT_TEISEJAI
RETURNS ( TEISEJO_ID DECIMAL (15, 0), VARDAS VARCHAR (24), PAVARDE
VARCHAR (24), LYTIS SMALLINT, GIMIMO_DATA DATE, MIESTAS VARCHAR (24),
SALIS VARCHAR (24))
AS
BEGIN
for select t."Teisejo_ID" , z."Vardas", z."Pavarde", z."Lytis",
z."Gimimo_data", z."Miestas", z."Salis"
from TEISEJAI t
join ZMONES z
on t."Zmogaus_ID"=z."Zmogaus_ID"
into :Teisejo_ID, :Vardas, :Pavarde, :Lytis, :Gimimo_data, :Miestas,
:Salis
do
SUSPEND;
END
queries SQL code: select * from SP_SELECT_TEISEJAI;
KeyLinks set to "Teisejo_ID" (as it's a PK in a TEISEJAI table), but
when try to prepare statement, got warning, that "Blank SQL statement
is not allowed" (in other cases warning is that invalid KeyLinks
entry: "Teisejo_ID" - why?), but prepared parameter turns to true.
When I open dataset, again got several such warnings, but records are
fetched. Suspect, that select SP is bad, but can't find an error
If SP raises exception, SUSPEND is needed or not?
Gediminas