易截截图软件、单文件、免安装、纯绿色、仅160KB

Mysql的DBHelper.cs

using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using MySql.Data.MySqlClient;
namespace i_salesDAL
{
public class DBHelper
{
//引导数据库连接数据库调用Web.Config文件
private static MySqlConnection connection;
//创建连接
public static MySqlConnection Connection
{
get
{
MySqlConnection myConn = new MySqlConnection("server=localhost;user id=root;password=root;database=google;CharSet=gb2312;");
string connectionString = myConn.ConnectionString;
if (connection == null)
{
connection = new MySqlConnection(connectionString);
//打开连接
connection.Open();
}
else if (connection.State == System.Data.ConnectionState.Closed)
{
connection.Open();
}
else if (connection.State == System.Data.ConnectionState.Broken)
{
connection.Close();
connection.Open();
}
return connection;
}
}
//(无参)返回执行的行数(删除修改更新)
public static int ExecuteCommand(string safeSql)
{
MySqlCommand cmd = new MySqlCommand(safeSql, Connection);
int result = cmd.ExecuteNonQuery();
return result;
}
//(有参)
public static int ExecuteCommand(string sql, params MySqlParameter[] values)
{
MySqlCommand cmd = new MySqlCommand(sql, Connection);
cmd.Parameters.AddRange(values);
return cmd.ExecuteNonQuery();
}
//(无参)返回第一行第一列(删除修改更新)
public static int GetScalar(string safeSql)
{
MySqlCommand cmd = new MySqlCommand(safeSql, Con


相关文档:

Memcache VS MySQL Query Cache.

记得前天有人问我, Memcache 和 MySQL 自己的 Query Cache 有啥区别? 我这样回答的,前者是山寨中的战斗机,后者是官方的战斗机。
新手回答问题,错了莫怪。哈哈哈。
好像细节上的差别还是有的。
Memcache优点如下:
  1. 理论上可以支撑无限并发业务操作。
  2. 可以启用单独的实例来缓存巨多的数据。(当 ......

mysql server安装

三. mysql server安装
    ------------------以下为扩展:删除mysql----------------
    删除 mysql
    sudo apt-get autoremove --purge mysql-server-5.0
    sudo apt-get remove mysql-server
    sudo apt-get autoremove mysql- ......

MySQL Cluster Overview


MySQL Cluster
is a technology that enables
clustering of in-memory databases in a shared-nothing system. The
shared-nothing architecture allows the system to work with very
inexpensive hardware, and with a minimum of specific requirements
for hardware or software.

......

mysql 阿拉伯数字转换中文函数

CREATE DEFINER=`root`@`%` FUNCTION `sp_cn`(n_LowerMoney  decimal(15,2)) RETURNS varchar(200) CHARSET utf8
begin
Declare v_LowerStr  VARCHAR(200) ;
Declare v_UpperPart VARCHAR(200) ;
Declare v_UpperStr VARCHAR(200) ;
Declare i_I int ;
set v_LowerStr = LTRIM(RTRIM(ROUND(n_LowerMoney,2 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号