ODAC V 6.25.1.13 on C++ BUilder 2007 - Table Info

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
scgrant327
Posts: 8
Joined: Fri 11 Jul 2008 19:06

ODAC V 6.25.1.13 on C++ BUilder 2007 - Table Info

Post by scgrant327 » Thu 17 Sep 2009 21:03

Stupid question...can I find out specifics about a table at runtime. I have fields in a table that I will be updating via dynamic SQL generation. What I want to do is find out such things as floating point length of a field sot that I can verify the data before trying to stuff it in the database....

Any ideas?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 18 Sep 2009 07:35

You can use the following code to get field precision and scale:

Code: Select all

  TFieldDesc *FieldDesc = OraQuery->GetFieldDesc("MyFieldName");
  FieldDesc->Length;
  FieldDesc->Scale;

scgrant327
Posts: 8
Joined: Fri 11 Jul 2008 19:06

Thanks

Post by scgrant327 » Mon 21 Sep 2009 16:19

That worked for me. Talk about hard-to-find features...

Post Reply