记下犯的弱智问题 & 常用的几个连接语句模板

        Mysql连接语句中的字符集编码只支持 utf8,不支持utf-8这样的写法,害得调试找了半天。发下我常用的几个模板,具体使用你可以去替换。或写成一个static函数。sqlserver因为在程序中考虑到和access的兼容,使用的是oledb的连接方式

       

  1. /// <summary>
  2.  /// Mysql连接语句模板
  3.  /// </summary>
  4.  public static string connMysqlTemplate = "server=[数据库路径];user id=[用户名]; password=[密码]; database=[数据库]; pooling=false;charset=[编码];Port=[端口];";
  5.  
  6.  /// <summary>
  7.  /// SqlServer连接语句模板
  8.  /// </summary>
  9.  public static string connSqlServerTemplate = "Provider=Microsoft.Jet.OLEDB.4.0;Password=;User ID=[用户名];Data Source=[数据库];Jet OLEDB:Database Password=[密码]";
  10.  
  11.  /// <summary>
  12.  /// Sqlite连接语句模板
  13.  /// </summary>
  14.  public static string connSqliteTemplate = "Provider=SQLiteOLEDB;Data Source=[数据库路径]";
  15.  
  16.  /// <summary>
  17.  /// Access连接语句模板
  18.  /// </summary>
  19.  public static string connAccTemplate = "Provider=Microsoft.Jet.OLEDB.4.0;Password=;User ID=;Data Source=[数据库路径];Jet OLEDB:Database Password=";

引用通告地址: 点击获取引用地址
评论: 3 | 引用: 0 | 阅读: 804
P90x Workout [ 2011-07-23 16:15 网址 | 回复 | 编辑 删除 ]
Good article in the knowledge that people constantly bathed in the ocean and noble culture, you share the article I like, thank you, I will continue to carefully taste so that they enrich themselves
P90x Workout Schedule
P90x Dvd
cheap uggs for sale [ 2011-10-05 10:00 网址 | 回复 | 编辑 删除 ]
If you are worried about purchasing authentic uggs clearance boots, think about the adhering to suggestions to make sure that your footwear is guaranteed real and definitely not a low cost rip off. Considering that these boots are normally more expensive than other types of boots of similar makeup, so it is crucial that your excess bucks are spending for anything real.
canada goose parka [ 2011-10-28 10:31 网址 | 回复 | 编辑 删除 ]
om
Bullpen coach Derek canada goose kensington parka Lilliquist took the call, and La righty canada goose parka Jason Motte play catch. But Lilliquist never heard the Motte part.La Russa brought in moncler jackets for men
Rzepczynski to face the lefthanded-hitting David Murphy, but when Mike Napoli came up, La Russa finally moncler jackets for women realized and Napoli hit a game-winning two-run Moncler Clothing double.
  • 1 
发表评论
昵 称: 密 码:
网 址: 邮 箱:
选 项:    
头 像:
内 容: