摘要: 使用python连接到本地的sqlserver数据库时,需要将服务“属性”中的“安全性”设置为“SQL Server和windows身份验证模式”使用sa登录,提示该账户被禁用:>>> pyodbc.connect("DRIVER={SQL Server};SERVER=XP-201210161011;DATABASE=test;UID=sa;PWD=sa")Traceback (most recent call last): File "<stdin>", line 1, in <module>pyodbc.P 阅读全文
posted @ 2012-11-02 17:21 醇酒醉影 阅读(2092) 评论(0) 推荐(0) 编辑
摘要: mongo-日期类型(2)mongo中的日期类型,使用ISO格式,例如:ISODate("2012-11-02T07:58:51.718Z")。下面来测试一下:C:\>mongo 127.0.0.1:2222/testMongoDB shell version: 1.8.3connecting to: 127.0.0.1:2222/testtype "help" for helpneu:PRIMARY> db.t2.insert({mydate:ISODate("2012-11-02T07:58:51.718Z")})ne 阅读全文
posted @ 2012-11-02 16:28 醇酒醉影 阅读(24260) 评论(0) 推荐(2) 编辑
摘要: 一、中文字符的查询在windows的cmd命令中,查询mongo数据时,中文会出现乱码:C:\>mongo 127.0.0.1:2222/testMongoDB shell version: 1.8.3connecting to: 127.0.0.1:2222/testneu:PRIMARY> show collectionssystem.indexest1yctshardneu:PRIMARY> db.t1.find(){ "_id" : ObjectId("50937174e513bab18cd6d3cb"), "name 阅读全文
posted @ 2012-11-02 15:56 醇酒醉影 阅读(9538) 评论(0) 推荐(0) 编辑