随笔 - 78  文章 - 1  评论 - 126  阅读 - 19万
06 2010 档案
EnterpriseLibrary.Data 的连接字符串在code里
摘要:using Microsoft.Practices.EnterpriseLibrary.Data.Sql;SqlDatabase db = new SqlDatabase(“Data Source=127.0.0.1;Initial Catalog=DB;Persist Security Info=True;User ID=sa;Password=");DbCommand dbComm... 阅读全文
posted @ 2010-06-28 18:45 myx 阅读(355) 评论(0) 推荐(0) 编辑
log4net 配置速成(保存到数据库)
摘要:1.Properties/AssemblyInfo.cs 里加上2句代码:  a. using log4net.Config; b. [assembly: XmlConfigurator(ConfigFile = "Log4Net.config", Watch = true)]2. 把Log4Net.config 文件 放在与web.config 一个目录。就是根目录咯。3. 建数据库及LOG表。... 阅读全文
posted @ 2010-06-24 01:01 myx 阅读(7966) 评论(2) 推荐(1) 编辑
mvc 与 favicon.ico
摘要:刚在chrome 5.0396的测试打开mvc做的打开页面,发现页面都请求2次。 原来是另一次请求是: http://www.url.com/favicon.ico 但在Firefox,IE里只有一次。http://www.ibole.cn/.NET/ASP_NET_MVC_Tip_18_%E5%8F%82%E6%95%B0%E5%8C%96_HTTP_Context_Mike_In_Jesus_... 阅读全文
posted @ 2010-06-16 01:56 myx 阅读(3384) 评论(0) 推荐(0) 编辑
PostgreSQL数据的导出导入
摘要:导出PostgreSQL数据库中的数据:$ pg_dump -U postgres -f mydatabase.sql mydatabase导入数据时首先创建数据库再用psql导入:$ createdb newdatabase$ psql -d newdatabase -U postgres -f mydatabase.sql 阅读全文
posted @ 2010-06-03 17:35 myx 阅读(10042) 评论(0) 推荐(0) 编辑
postgreSQL分页
摘要:select * from xxx limit 10 offset 0;offset 偏移量 0表示从第一条开始limit 共取几条 10表示本次查询10条 阅读全文
posted @ 2010-06-03 14:53 myx 阅读(5054) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示