G
Guest
Hi,
To send the result table from the stored procedure back to a client, I have
to create SqlDataRecord and send the rows one-by-one.
The constructor fro SqlDataRecord needs an instance of the SqlMetaData. To
create this instance I need the type definition for a particular column.
For example:
SqlMetaData data = new SqlMetaData ("ColumnName", SqlDbType.NVarChar, 50);
In my stored procedure I have a data adapter, that fills the data table:
dad.Fill( myTable);
To get column type:
object obj = myTable.Columns[0].DataType.FulName;
This will return System.String.
How can I get the database types for the column, with the length
specification? (SqlDbType.NVarChar, length constrain = 50).
Thanks,
Lubomir
To send the result table from the stored procedure back to a client, I have
to create SqlDataRecord and send the rows one-by-one.
The constructor fro SqlDataRecord needs an instance of the SqlMetaData. To
create this instance I need the type definition for a particular column.
For example:
SqlMetaData data = new SqlMetaData ("ColumnName", SqlDbType.NVarChar, 50);
In my stored procedure I have a data adapter, that fills the data table:
dad.Fill( myTable);
To get column type:
object obj = myTable.Columns[0].DataType.FulName;
This will return System.String.
How can I get the database types for the column, with the length
specification? (SqlDbType.NVarChar, length constrain = 50).
Thanks,
Lubomir