Print Thread
"Describing" Object without fetching TOracleObject
#799 08/24/00 05:40 PM
Joined: Aug 2000
Posts: 21
Melbourne,VIC,Australia
S
Sonique Offline OP
Member
OP Offline
Member
S
Joined: Aug 2000
Posts: 21
Melbourne,VIC,Australia
Just a quick one this time ... is there a way, after haing described a query, to retrieve a TOracleObject even though the query has not yet been executed?

I need/want this ability in the case where a table with object columns does not have any rows (my code currently fetches the object from the first row and uses it's methods to 'describe' it) ... currently I plan to either interrogate the Oracle Data Dictionary (which I already have code for, but ...), or write a new method for TOracleQuery which makes use of OCI (for performance) to return an object similar to TOracleObject ...

Re: "Describing" Object without fetching TOracleObject
#800 08/28/00 10:25 PM
Joined: Aug 1999
Posts: 22,200
Member
Offline
Member
Joined: Aug 1999
Posts: 22,200
This is not possible right now. The type name and owner are only known internally (TFieldData.TypeName = owner.name). If you have the source files it's pretty straightforward to create a TOracleQuery.FieldTypeName though.

------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations
Re: "Describing" Object without fetching TOracleObject
#801 08/29/00 03:01 AM
Joined: Aug 2000
Posts: 21
Melbourne,VIC,Australia
S
Sonique Offline OP
Member
OP Offline
Member
S
Joined: Aug 2000
Posts: 21
Melbourne,VIC,Australia
I came to pretty much the same conclusion, and added the following method:

function TOracleQuery.FieldTypeName(FieldId: Integer): String;
begin
if (FieldId < 0) or (FieldId > FieldList.Count - 1) then
raise Exception.Create('Field ' + IntToStr(FieldId) + ' does not exist');
Result := (FieldList.Items[FieldId] as TFieldData).TypeName;
end;

Thanks for confirming that I went the right way


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.080s Queries: 13 (0.029s) Memory: 2.5008 MB (Peak: 3.0378 MB) Data Comp: Off Server Time: 2024-04-19 17:10:15 UTC
Valid HTML 5 and Valid CSS