有一个SQL2K5表包含一个名为
IsEnabled BIT NOT NULL
有一段C代码,它使用SQL读取器调用存储过程,循环遍历结果行,并将一些信息写入日志文件以及执行其他操作。
using (SqlDataReader reader = DAL.SqlHelper.ExecuteReader(connStr, "usp_MySproc"))
{
while (reader.Read())
{
//code to do stuff...
string s = reader["IsEnabled "].ToString(); //exactly like this...
//code to concatenate `s` with other values
//log it all to file
}
}
奇怪的是,在一些较旧的日志文件中,该值以
1
或者
0
而在更新的日志文件中,它被写成
true
或者
false
-
-
有人将表中的数据类型从int->位更改为
-
有人将存储过程中的数据类型从int->位更改为其他位(可能其中的强制转换/转换被删除)
-
我在google上搜索了一个小时左右,寻找.net2.0和.net3.5之间的变化,但什么都没有。