2011年8月24日

SQLite数据库参数化编程时,采用命名参数的方式

摘要: 在网上看到很多帖子说SQLite数据库参数化编程,只能使用非命名参数,如下形式:comm.CommandText = "select * from [FurnitureCategory] where [categoryID]= ? ";comm.Parameters[0].Value = categoryID.ToString();comm.Parameters[0].DbType = DbType.String;即给命令传递参数的时候,采用 "?"作为占位符,然后在通过 参数列表索引的方式给其赋值.甚至还有的网友提出这个时候一定不能给Parameter 阅读全文

posted @ 2011-08-24 12:30 zqonline 阅读(656) 评论(0) 推荐(0) 编辑

System.Data.SQLite 不能在.net 4.0 里引用的解决方法

摘要: 两个程序集,由于http://sqlite.phxsoftware.com/的System.Data.SQLite是混合模式程序集,是针对“v2.0.50727”版的运行时生成的,在没有配置其他信息的情况下,无法在 4.0 运行时中加载该程序集。故需要在App.config中配置如下参数。<?xml version="1.0" encoding="utf-8" ?><configuration><startup useLegacyV2RuntimeActivationPolicy="true">&l 阅读全文

posted @ 2011-08-24 12:22 zqonline 阅读(2377) 评论(0) 推荐(0) 编辑

导航