L
Luki
Hello
i'm stuck on a seemingly small problem. i'm trying get the default value
of a column in a table on a MS SQL Server. i try to use sp_columns. eg
sp_columns @table_name = 'addresses'
in Query Analyzer this will produce a nice list where COLUMN_DEF
contains the default value. but if i fill a dataset with it, the column
COLUMN_DEF is always null! i even binded it to a datagrid and the column
shows up empty.
looking at the SP the column COLUMN_DEF seems to be of type TEXT. so i
guess this is the problem...
any idea on how solve this and get the value in COLUMN_DEF? i would like
to use a system stored procedure, not access the sysobjects directly.
thanks for any pointers!
beat
(i couldn't find any better matching ng. if there's one i'll happily
repost there)
i'm stuck on a seemingly small problem. i'm trying get the default value
of a column in a table on a MS SQL Server. i try to use sp_columns. eg
sp_columns @table_name = 'addresses'
in Query Analyzer this will produce a nice list where COLUMN_DEF
contains the default value. but if i fill a dataset with it, the column
COLUMN_DEF is always null! i even binded it to a datagrid and the column
shows up empty.
looking at the SP the column COLUMN_DEF seems to be of type TEXT. so i
guess this is the problem...
any idea on how solve this and get the value in COLUMN_DEF? i would like
to use a system stored procedure, not access the sysobjects directly.
thanks for any pointers!
beat
(i couldn't find any better matching ng. if there's one i'll happily
repost there)