Re: Field width



Sorry, I guess I could have mentioned that I am working with an Access DB.
I think I now know enough to search and find what I need to know to
implement your answer. Thanks very much.

Bob Berry

"Brian Bushay TeamB" <BBushay@xxxxxxxxx> wrote in message
news:83780494lp6jtdb5i6h1uradv05drm18p4@xxxxxxxxxx

How can I determine the width of a text field in a DB? Is there DDL that
will give me this info?

That information will depend some what on the database you are using.

The TAdoConnection.OpenSchema method is one way of getting at this
information.

In SQL server the following code will populate AdoDataset1 with the field
information from the categories Table

ADOConnection1.OpenSchema(siColumns
,VarArrayOf([Null,Null,'Categories',null]),EmptyParam,ADODataSet1)

will give you
--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx



.



Relevant Pages

  • Re: XP_CmdShell and OLE provider
    ... First is the Foxpro Oledb driver installed on the machine where SQL server is ... Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)
  • Re: Update Query
    ... >This syntax should work for SQL server and Access ... >Brian Bushay (TeamB) ... Prev by Date: ...
    (borland.public.delphi.database.ado)
  • Re: ADO connection
    ... That is not something you can detect with ADO or SQL server ... Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)
  • Re: Ado, Transaction, Multiline statements?
    ... >1) is it good form to do multi line inserts like this? ... Not all errors generated by SQL server will generate an exception in Delphi ... Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)
  • Re: Field width
    ... That information will depend some what on the database you are using. ... In SQL server the following code will populate AdoDataset1 with the field ... Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)