| View previous topic :: View next topic |
| Author |
Message |
Daniel Guest
|
Posted: Fri Jul 29, 2005 12:42 am Post subject: How to get Field Data type |
|
|
Hi,
How to get data type of a field in one table? I know there is
TFieldType in VCL, and
AdoQuery.Fields[0].DataType
can get it as well. but it seems not exactlly mapping to SQL data type.
Is there any SQL syntax to get a fields data type named in SQL system Data
type?
Thanks a lot.
Daniel
|
|
| Back to top |
|
 |
Bill Todd Guest
|
Posted: Fri Jul 29, 2005 2:04 am Post subject: Re: How to get Field Data type |
|
|
With most servers you can query the server directly. How you do that
depends on the server you are using and we do not know which server you
are using.
--
Bill Todd (TeamB)
|
|
| Back to top |
|
 |
Daniel Guest
|
Posted: Fri Jul 29, 2005 4:14 am Post subject: Re: How to get Field Data type |
|
|
I am using MS SQL Server.
I want to get the field type from a table, so I can check if an input field
format is correct.
Thanks,
Daniel
"Bill Todd" <no (AT) no (DOT) com> 撰寫於郵件新聞:42e98ec5$1 (AT) newsgroups (DOT) borland.com...
| Quote: | With most servers you can query the server directly. How you do that
depends on the server you are using and we do not know which server you
are using.
--
Bill Todd (TeamB)
|
|
|
| Back to top |
|
 |
Maurice Telkamp Guest
|
Posted: Fri Jul 29, 2005 7:19 am Post subject: Re: How to get Field Data type |
|
|
Perhaps something like this:
SELECT * from information_schema.columns
WHERE table_name='MyTableName' AND column_name='MyColumnName'
Maurice
"Daniel" <dan59314 (AT) ms3 (DOT) hinet.net> wrote
| Quote: | I am using MS SQL Server.
I want to get the field type from a table, so I can check if an input
field format is correct.
Thanks,
Daniel
"Bill Todd"
撰寫於郵件新聞:42e98ec5$1 (AT) newsgroups (DOT) borland.com...
With most servers you can query the server directly. How you do that
depends on the server you are using and we do not know which server you
are using.
--
Bill Todd (TeamB)
|
|
|
| Back to top |
|
 |
Daniel Guest
|
Posted: Mon Aug 01, 2005 1:34 am Post subject: Re: How to get Field Data type |
|
|
Thanks.
"Maurice Telkamp" <maurice.telkamp_at_beeone.nl> 撰寫於郵件新聞:42e9d7c2$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Perhaps something like this:
SELECT * from information_schema.columns
WHERE table_name='MyTableName' AND column_name='MyColumnName'
Maurice
"Daniel" <dan59314 (AT) ms3 (DOT) hinet.net> wrote in message
news:42e9ad16 (AT) newsgroups (DOT) borland.com...
I am using MS SQL Server.
I want to get the field type from a table, so I can check if an input
field format is correct.
Thanks,
Daniel
"Bill Todd" <no (AT) no (DOT) com> 撰寫於郵件新聞:42e98ec5$1 (AT) newsgroups (DOT) borland.com...
With most servers you can query the server directly. How you do that
depends on the server you are using and we do not know which server you
are using.
--
Bill Todd (TeamB)
|
|
|
| Back to top |
|
 |
|