Skip to main content

Posts

2007总结,2008展望

2007:做的最大的决定就是买房子,当然不是我买,确切得说不是我出钱,我连当房奴的资格都没有。家里出了一大半。在没有人愿意和我一起供房子的情况下,未来的四年,我都在给银行打工。 2008:希望现在的项目能在一月完成。

sp_tables的@table_type参数

打算写个工具,直接从数据库按字段生成类,使用到了sp_tables,遇到了很奇怪的问题。 查MSDN可以知道:sp_tables的参数之一:@table_type varchar(100) 可选项有: TABLE 、 SYSTEMTABLE 、 VIEW 。 我写了如下代码: Databasedb = DatabaseFactory.CreateDatabase(); DbCommand com = new SqlCommand(); com.CommandText = "sp_tables"; com.CommandType = CommandType.StoredProcedure; com.Parameters.AddWithValue("@table_type", "TABLE"); IDataReader reader = db.ExecuteReader(com); 却拿不到任何东西。不加@talbe_type的话又返回了大量的系统VIEW。 查看sp_tables的源码,在关于@talbe_type的部分发现如下的东西: if (charindex('''TABLE''',@table_type) 0) 倒回去 仔细 看MSDN,参数的说明部分: [ , [ @table_type = ] "'type'" ] 比一般的多了2个",而且下面也有说明 Single quotation marks must enclose each table type, and double quotation marks must enclose the whole parameter. Table types must be uppercase. If SET QUOTED_IDENTIFIER is ON, each single quotation mark must be doubled and the whole parameter must be enclosed in single quotation marks. 太大意了。 修改代码: com.Parameters.AddWithValue(...

再次安装MT失败

1000+的文件,上传费了几个小时,结果还是可耻的失败了。 Got an error: Can't locate object method "configure" via package "MT::ObjectDriverFactory" at lib/MT.pm line 876. 谁碰到过这个ERROR,指点一下。

内存升级到4G

嘿嘿