Hi,
I'm using the SqlServer managed provider from the framework (SqlClient) to
communicate with SqlServer.
I have the following table in the database:
create table t1(f1 int)
I already have an instance of SqlCommand (slqCommand) setup with the correct
connectionstring and have the following peace of code:
--------------------------
sqlCommand.CommandText = "select * from t1";
SqlDataReader reader = sqlCommand.ExecuteReader(
CommandBehavior.KeyInfo );
DataRow[] infoRows = reader.GetSchemaTable().Select();
reader.Close();
Console.Write("\n" + infoRows[0].IsNull("NumericScale"));
Console.Write("\n" + infoRows[0]["NumericScale"]);
---------------------------
It gives me the output :
False
255
But the documentation says:
---------------------------
NumericScale: If ProviderType is is DBTYPE_DECIMAL or DBTYPE_NUMERIC, the
number of digits to the right of the decimal point. Otherwise, this is a
null value.
---------------------------
- so i figure that this must be a bug (?), or what am I doing wrong?
By the way same thing happens when "f1" is of type e.g. "text".
Morten Overgaard Hansen