i've got a problem with UniDAC 4.6(.12), which wasn't there with
UniDAC 4.3. So basically i'm doing this:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var
ds : TUniQuery;
f : TField;
conn : TUniConnection;
begin
conn := TUniConnection.Create(nil);
conn.ProviderName := 'Oracle';
conn.Server := 'BSORACLE10:1521:LOGOMUEN';
conn.Username := 'xxx';
conn.Password := 'xxx';
conn.SpecificOptions.Values['Direct'] := 'True';
conn.SpecificOptions.Values['Schema'] := 'logoadmin';
conn.SpecificOptions.Values['Charset'] := 'WE8MSWIN1252';
conn.SpecificOptions.Values['PrecisionLargeint'] := '38';
conn.Connect;
ds := TUniQuery.Create(nil);
ds.Connection := conn;
ds.SQL.Text := 'select PMSPROJEKTID from PMSDATA where PMSDATAID = 39668183';
ds.FetchRows := 250;
ds.Options.FlatBuffers := True;
ds.UniDirectional := True;
ds.SpecificOptions.Values['DeferredLobRead'] := 'True';
ds.SpecificOptions.Values['AutoClose'] := 'True';
ds.SpecificOptions.Values['FetchAll'] := 'False';
ds.Prepared := True;
ds.Open;
for f in ds.Fields do begin
ShowMessage(Format('%s: %d', [f.FieldName, Ord(f.DataType)]));
end;
end;Code: Select all
CREATE TABLE LOGOADMIN.PMSDATA (
PMSDATAID Number(12) DEFAULT 0 NOT NULL,
...
PMSPROJEKTID Number(12),
...
CONSTRAINT PK_PMSDATA PRIMARY KEY (
PMSDATAID
)
)
TABLESPACE LOGO
LOGGING
STORAGE (
INITIAL 64K
MAXEXTENTS 2147483645
)
/
ALTER TABLE LOGOADMIN.PMSDATA ADD CONSTRAINT FK_PMSDATA_PMSPROJEKT FOREIGN KEY (PMSPROJEKTID)
REFERENCES LOGOADMIN.PMSPROJEKT (PMSPROJEKTID)
ON DELETE CASCADE
VALIDATE
/
/
CREATE INDEX LOGOADMIN.IDX_PMSDATA_PMSPROJEKT
ON LOGOADMIN.PMSDATA(PMSPROJEKTID DESC)
STORAGE (
INITIAL 64K
MAXEXTENTS 2147483645
)
LOGGING
TABLESPACE LOGO_IND
/
Now, when i execute the above code with the given SQL
Code: Select all
'select PMSPROJEKTID from PMSDATA where PMSDATAID = 39668183'But when i change the SQL to this query:
Code: Select all
'select PMSPROJEKTID from PMSDATA where PMSPROJEKTID = 39668179'I think the reason for this is, that the second query is executed
with the index on PMSPROJEKTID.
Is there a option/possibility to get the DataTyp ftLargeint for the
second query too? I.e. supress the above behaviour?
Thank you very much for your help.
Ricardo Angeli