Subject | RE: [firebird-support] Problem with Execute statement |
---|---|
Author | Paul Mercea |
Post date | 2006-04-08T17:11:08Z |
Sorry for posting, I forgot to put the error message.
Error message:
ISC ERROR CODE:335544829
ISC ERROR MESSAGE:
Variable type (position 1) in EXECUTE STATEMENT 'select loc_id, loc_name
from SY' INTO does not match returned column type
password required
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Paul Mercea
Sent: Saturday, April 08, 2006 6:51 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Problem with Execute statement
Hi
I want to create generic procedure to execute sql statements passed as
variable.
I have made this test procedure to verify if is working:
CREATE PROCEDURE T2 (
T VARCHAR(20))
RETURNS (
IDN VARCHAR(30),
IDL INTEGER)
AS
DECLARE VARIABLE STRSQL VARCHAR(50);
begin
strsql='select loc_id, loc_name from '||T;
for execute statement :strsql into :idl, :idn do
begin
suspend;
end
end
I pass table name (SYS_LOCATION) and I get this error message:
"Variable type (position 0) in EXECUTE STATEMENT 'select loc_id, loc_name
from SY' INTO does not match returned column type.
Password required"
If I change strsql='select loc_id, loc_name from '||T||' '; I get message:
"Variable type (position 1) in EXECUTE ......"
Same message if I modify like this:
strsql='select loc_id, loc_name from ';
for execute statement :strsql ||T into :idl, :idn do
What I'm doing wrong????
TIA
PaulM
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
Error message:
ISC ERROR CODE:335544829
ISC ERROR MESSAGE:
Variable type (position 1) in EXECUTE STATEMENT 'select loc_id, loc_name
from SY' INTO does not match returned column type
password required
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Paul Mercea
Sent: Saturday, April 08, 2006 6:51 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Problem with Execute statement
Hi
I want to create generic procedure to execute sql statements passed as
variable.
I have made this test procedure to verify if is working:
CREATE PROCEDURE T2 (
T VARCHAR(20))
RETURNS (
IDN VARCHAR(30),
IDL INTEGER)
AS
DECLARE VARIABLE STRSQL VARCHAR(50);
begin
strsql='select loc_id, loc_name from '||T;
for execute statement :strsql into :idl, :idn do
begin
suspend;
end
end
I pass table name (SYS_LOCATION) and I get this error message:
"Variable type (position 0) in EXECUTE STATEMENT 'select loc_id, loc_name
from SY' INTO does not match returned column type.
Password required"
If I change strsql='select loc_id, loc_name from '||T||' '; I get message:
"Variable type (position 1) in EXECUTE ......"
Same message if I modify like this:
strsql='select loc_id, loc_name from ';
for execute statement :strsql ||T into :idl, :idn do
What I'm doing wrong????
TIA
PaulM
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links