Exception - Can't convert AsMemo
Posted: Sun 15 Mar 2009 07:55
Hi,
I am calling a PG function:
------------------------------------
CREATE OR REPLACE FUNCTION spLog(log_type integer, log_msg text, log_user integer)
RETURNS INTEGER AS $$
..........
However, when using either TpgSQL or TpgStoredProc the following happens
pgspLog.Params.Items[1].AsInteger := 1;
pgspLog.Params.Items[2].AsMemo := ''; //NO PROBLEM
pgspLog.Params.Items[3].AsInteger := 1;
pgspLog.Execute;
retval := pgspLog.Params[0].AsInteger;
showmessage(inttostr(retval));
-------------------------------------------------------
pgspLog.Params.Items[1].AsInteger := 1;
pgspLog.Params.Items[2].AsMemo := 'test'; //NOW WE HAVE PROBLEM AsString makes no difference
pgspLog.Params.Items[3].AsInteger := 1;
pgspLog.Execute;
retval := pgspLog.Params[0].AsInteger;
showmessage(inttostr(retval));
IF I attempt to modify the parameter 'log_msg' an exception is thrown:
Project pgTester.exe raised class Exception with message 'Cannot convert type'. Process Stopped. Use Step or Run to Continue.
Application Error: Exception Exception in module pgdac70.bpl at 00016E41
Any thoughts here?
Thanks,
Dan Wade
I am calling a PG function:
------------------------------------
CREATE OR REPLACE FUNCTION spLog(log_type integer, log_msg text, log_user integer)
RETURNS INTEGER AS $$
..........
However, when using either TpgSQL or TpgStoredProc the following happens
pgspLog.Params.Items[1].AsInteger := 1;
pgspLog.Params.Items[2].AsMemo := ''; //NO PROBLEM
pgspLog.Params.Items[3].AsInteger := 1;
pgspLog.Execute;
retval := pgspLog.Params[0].AsInteger;
showmessage(inttostr(retval));
-------------------------------------------------------
pgspLog.Params.Items[1].AsInteger := 1;
pgspLog.Params.Items[2].AsMemo := 'test'; //NOW WE HAVE PROBLEM AsString makes no difference
pgspLog.Params.Items[3].AsInteger := 1;
pgspLog.Execute;
retval := pgspLog.Params[0].AsInteger;
showmessage(inttostr(retval));
IF I attempt to modify the parameter 'log_msg' an exception is thrown:
Project pgTester.exe raised class Exception with message 'Cannot convert type'. Process Stopped. Use Step or Run to Continue.
Application Error: Exception Exception in module pgdac70.bpl at 00016E41
Any thoughts here?
Thanks,
Dan Wade