dbExpress conversion Oracle integer Delphi integer


2004-02-03 11:21:28 PM
delphi223
Hi all,
I'm migrating from InterBase to Oracle and trying to convert stored
procedures in order to
avoid rewriting application-code.
Problem arises with integers:
As an example I have in InterBase the stored procedure:
CREATE PROCEDURE GETMAPOPTIONS (
GROUPID INTEGER,
OBJECTNUMBER INTEGER)
RETURNS (
OPTIONS VARCHAR (40),
RETURNCODE INTEGER)
which is called i Delphi by code like this:
FSQLDataSet.CommandType := ctStoredProc;
FSQLDataSet.CommandText := GetMapOptions';
FSQLDataSet.ParamByName('GROUPID').AsInteger := 3;
FSQLDataSet.ParamByName('OBJECTNUMBER').AsInteger := 14;
FSQLDataSet.Open;
In Oracle I have to use:
FSQLDataSet.CommandType := ctStoredProc;
FSQLDataSet.CommandText := 'Poscursor.GetMapOptions';
FSQLDataSet.ParamByName('GROUPID').AsBCD := 3;
FSQLDataSet.ParamByName('OBJECTNUMBER').AsBCD := 14;
FSQLDataSet.Open;
Is there anyone knowning have to avoid using AsBCD instead of AsInteger.
Regards
Staffan