以下是直接从代码中复制出来的 Data Source=192.168.2.1\\SQLEXPRESS;Initial Catalog=DesignSystem;Persist Security Info=True;User ID=sa;Password=******** 而正确的应该是 Data S
分类:
其他好文 时间:
2016-03-16 09:36:14
阅读次数:
118
在查询语句的where里,如果要查询包含中文的条件,总是查不到值,感觉是问题。 原来在连接字符串中增加“Character Set=utf8” 很早以前就用过Entity Framework 连接过mysql,那时并没有中文乱码问题。这次使用,数据库是utf8编码,按理说,也不应该乱码,可是很不幸,
分类:
数据库 时间:
2016-03-09 16:03:31
阅读次数:
243
第一种:获取连接字符串 首先要定义命名空间 system.configuration 1. string connstr= string constr = ConfigurationManager.AppSettings["connstring"]; web.config文件:加在<appsetti
分类:
数据库 时间:
2016-03-02 10:52:09
阅读次数:
194
今天正好遇到需要做这个功能,顺手搜了一下网络,把几种方法都列出来,方便以后参考。 1 什么是合并多行字符串(连接字符串)呢,例如: SQL> desc test; Name Type Nullable Default Comments ------- ------------ -------- --
分类:
数据库 时间:
2016-02-25 15:37:46
阅读次数:
316
控制数据库的位置 默认情况下,数据库是创建在localhost\SQLEXPRESS服务器上,并且默认的数据库名为命名空间+context类名,例如我们前面的BreakAway.BreakAwayContext。 有几种方法可以改变这种默认约定。 利用配置文件 在配置文件中新加一个连接字符串 <co
分类:
数据库 时间:
2016-02-24 13:52:48
阅读次数:
245
1.下载安装MYSQL的ODBC数据库驱动程序(mysql-connector-odbc-5.3.4-win32.msi或者mysql-connector-odbc-5.3.4-winx64.msi)下载地址:http://dev.mysql.com/downloads/connector/odbc
分类:
数据库 时间:
2016-02-21 22:39:35
阅读次数:
488
MongoDB使用经验: 有时不知道MongoDB的错误码代表什么,那有这个链接: https://github.com/mongodb/mongo/blob/master/src/mongo/base/error_codes.err 关于MongoDB连接字符串,有两个经验: 对于node.js驱
分类:
Web程序 时间:
2016-02-16 21:55:46
阅读次数:
340
conatenationconcatenation许多将不同的字符串串联起来的方法用print()函数连接字符串默认情况,当要在一个语句中打印多个字符串print()函数会周全的插入空格没有必要使用空格分隔符只需要将不同的字符串隔开syntaxError:invalid character in i
分类:
编程语言 时间:
2016-02-15 18:25:15
阅读次数:
265
publicstaticclassSqlHelper{//获取连接字符串privatestaticreadonlystringconstr=ConfigurationManager.ConnectionStrings["connectionStr"].ConnectionString;//ExecuteNonQuery()方法//ExecuteScalar()方法//ExecuteReader()方法//ExecuteDataTable()方法//执行增删改的publ..
分类:
数据库 时间:
2016-02-14 08:03:58
阅读次数:
245
mybatis批量更新 首先在配置数据库连接字符串后面加上 &allowMultiQueries=true 我的完整的是这样的 jdbc:mysql://192.168.1.200:3306/huasheng?characterEncoding=utf-8&allowMultiQueries=tru
分类:
其他好文 时间:
2016-02-03 12:42:26
阅读次数:
158