#1  
Old 9th April 2010, 04:55 PM
blnicholson
 
Posts: n/a
Default out parameter in SP - Null column error


Hi,
I created test sp with output parameter:
DROP ROUTINE IF EXISTS "AAA";

CREATE PROCEDURE AAA
( IN PAR1 INTEGER,
OUT PAR2 INTEGER)
-- READS SQL DATA -- needs either read-access
-- MODIFIES SQL DATA -- or write access
BEGIN
SET PAR2 = 222;
END
Then I use this sp in Delphi:
procedure TApplicationManager.Test();
var
proc: TADOStoredProc;
begin
proc := TADOStoredProc.Create(nil);
proc.Connection := WBConnection;
proc.ProcedureName := 'AAA';

proc.Parameters.CreateParameter('PAR1', ftInteger, pdInput, 4,91);
proc.Parameters.CreateParameter('PAR2', ftInteger, pdOutput, 4,0);

proc.ExecProc;
ShowMessage(INTTOSTR(proc.Parameters[1].Value));
end;

The execution of the Test procedure in Delphi returns the following
error:
Unknown column NULL.

But if I change PAR2 in SP from OUT to IN and make adjustment to the
line:
proc.Parameters.CreateParameter('PAR2', ftInteger, pdInput, 4,151);
it displays the value passed into SP.

And obviously this sp runs fine in query analyser...
Can you please help me?


--
blnicholson
  #2  
Old 1st June 2012, 09:52 PM
dani dani is offline
Junior Member
 
Join Date: Jun 2012
Posts: 7
Default

Hi, I have the same problem,
Is there any solution?

Thanks
  #3  
Old 1st June 2012, 10:19 PM
Eivind Bakkestuen [NDD]
 
Posts: n/a
Default Re: out parameter in SP - Null column error

> Hi, I have the same problem,

Please repost in the sql newsgroup, including NexusDB version in use.

--
Eivind Bakkestuen [NDD]


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: Error: NexusDB: <unnamed TnxQuery instance>: Query execution failed Warren nexusdb.public.support.adoprovider 1 8th April 2010 03:55 PM
modifying a column length Matthew Balraj nexusdb.public.support.adoprovider 2 18th February 2010 05:50 PM
How do I define a not null Charater (NullString) Field Matthew Balraj nexusdb.public.support.adoprovider 1 12th February 2010 02:05 AM
Sum, Coalesce and Null fields Brenton Wildman nexusdb.public.support.adoprovider 1 19th January 2006 07:51 AM


All times are GMT +11. The time now is 06:17 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.