troubleshooting Question

Retruning parameters from stored procedure to Delphi using FIBplus

Avatar of Stephen Lappin
Stephen LappinFlag for United Kingdom of Great Britain and Northern Ireland asked on
DatabasesDelphi
9 Comments3 Solutions2152 ViewsLast Modified:
I have a stored procedure in Firebird that returns two parameters:

CREATE PROCEDURE OPDUTY_LOGON_LOGOFF_TIME(
  INDIVIDUAL_IDENT CHAR(6) CHARACTER SET ASCII,
  QUEUEEVENT_IDENT BIGINT)
RETURNS(
  OPDUTYSTARTTIME TIMESTAMP,
  OPDUTYENDTIME TIMESTAMP)
AS....

But when I call it from Delphi 2005 using FIBPlus 6.7.0, they return value of zero. When I run it in Firebird, it functions correctly. I have used a SQL monitor to check that it is being called, and that the correct values for the input parameters are supplied. Can anyone help me on this?

    try
      dtmUpdateCalculationDatasetModule.stpOpDutyLogonLogoffTime.
        ParamByName('INDIVIDUAL_IDENT').AsString := uclIndividual;
      dtmUpdateCalculationDatasetModule.stpOpDutyLogonLogoffTime.
        ParamByName('QUEUEEVENT_IDENT').AsInt64 := uclQueueEvent;
      dtmUpdateCalculationDatasetModule.stpOpDutyLogonLogoffTime.
        ExecProc;
      OpDutyStartTime := dtmUpdateCalculationDatasetModule.
        stpOpDutyLogonLogoffTime.ParamByName('OPDUTYSTARTTIME').AsDateTime;
      OpDutyEndTime := dtmUpdateCalculationDatasetModule.
        stpOpDutyLogonLogoffTime.ParamByName('OPDUTYENDTIME').AsDateTime;
    finally
      dtmUpdateCalculationDatasetModule.stpOpDutyLogonLogoffTime.Close;

ASKER CERTIFIED SOLUTION
Nick Upson
Principal Operations Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros