Page 1 of 1

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

Posted: Thu 17 Sep 2009 21:03
by scgrant327
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?

Posted: Fri 18 Sep 2009 07:35
by Plash
You can use the following code to get field precision and scale:

Code: Select all

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

Thanks

Posted: Mon 21 Sep 2009 16:19
by scgrant327
That worked for me. Talk about hard-to-find features...