hi,
another ADO problem:
how can i get the Column legth as declaredat the Sql data base?
for example - char(6)filed, char(10), ..,
the DataColumn.DataType property bring me the Type System.String for those
columns but i need the specific length,
is it possible?
thank's
stan

RE: get DataColumn length by MrSmersh

MrSmersh
Thu May 04 06:16:01 CDT 2006

The best solution to your problem(s) is to use the sp_help, you will get all
the info you need table name, column size etc.
Also you could use sp_columns just to get the column length.


"stanley" wrote:

> hi,
> another ADO problem:
> how can i get the Column legth as declaredat the Sql data base?
> for example - char(6)filed, char(10), ..,
> the DataColumn.DataType property bring me the Type System.String for those
> columns but i need the specific length,
> is it possible?
> thank's
> stan
>
>
>

RE: get DataColumn length by stanley

stanley
Thu May 04 07:41:02 CDT 2006

thanks for your response,
sp_help or sp_columns will not help me because my module is a business logic
level and cant reach the data base directly,
i am dealing only with DataTable and it's DataColumns!
another point is that if i will use sp_help\sp_columns it will not work on
onother Data Base (oracle),
way the ADO object (DataColumn) cant supply me the lenght of the field? it's
give me the Name & the Type but not the length! it's strange.
thanks anyway
stan.


"MrSmersh" wrote:

> The best solution to your problem(s) is to use the sp_help, you will get all
> the info you need table name, column size etc.
> Also you could use sp_columns just to get the column length.
>
>
> "stanley" wrote:
>
> > hi,
> > another ADO problem:
> > how can i get the Column legth as declaredat the Sql data base?
> > for example - char(6)filed, char(10), ..,
> > the DataColumn.DataType property bring me the Type System.String for those
> > columns but i need the specific length,
> > is it possible?
> > thank's
> > stan
> >
> >
> >

RE: get DataColumn length by MrSmersh

MrSmersh
Thu May 04 08:14:02 CDT 2006

In this case (SQL Server+Oracle +â?¦) you will need a data abstraction layer at
the lower level, that will fill this information in the DataTable,
DataColumns. .Net support for these kind of information is very limited (and
data provider dependent).

"stanley" wrote:

> thanks for your response,
> sp_help or sp_columns will not help me because my module is a business logic
> level and cant reach the data base directly,
> i am dealing only with DataTable and it's DataColumns!
> another point is that if i will use sp_help\sp_columns it will not work on
> onother Data Base (oracle),
> way the ADO object (DataColumn) cant supply me the lenght of the field? it's
> give me the Name & the Type but not the length! it's strange.
> thanks anyway
> stan.
>
>
> "MrSmersh" wrote:
>
> > The best solution to your problem(s) is to use the sp_help, you will get all
> > the info you need table name, column size etc.
> > Also you could use sp_columns just to get the column length.
> >
> >
> > "stanley" wrote:
> >
> > > hi,
> > > another ADO problem:
> > > how can i get the Column legth as declaredat the Sql data base?
> > > for example - char(6)filed, char(10), ..,
> > > the DataColumn.DataType property bring me the Type System.String for those
> > > columns but i need the specific length,
> > > is it possible?
> > > thank's
> > > stan
> > >
> > >
> > >