Subject | Re: [firebird-support] Access Table Column Metadata |
---|---|
Author | Martijn Tonies |
Post date | 2007-07-26T15:21:18Z |
Myles,
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> I have a PHP application that imports data from a Tab Delimited text file.import,
> I need to validate that the text file is correctly formatted (ie. Has the
> correct number of elements per line, that elements are 'reasonable' - e.g.
> that a column expecting a Date gets data that is in a Date format, etc.).
> I'm importing this data into a Firebird table.
>
> In order to be able to validate the text information in the file to
> I'd like to know the field types of each column in the table. The numberof
> elements per line in the text file matches exactly with the number ofTake a look at RDB$FIELDS in combination with RDB$RELATION_FIELDS.
> columns in the table.
>
> How can I query the Firebird database (this is in 1.5) and get back the
> column names and field types, so I can validate the text file for the
> import?
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com