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

c# 连接MySql数据库的两种方法

1、用MySQLDriverCS连接MySQL数据库
先下载和安装MySQLDriverCS,地
址:
http://sourceforge.net/projects/mysqldrivercs/
在安装文件夹下面找到
MySQLDriver.dll
,然后将
MySQLDriver.dll
添加引用到项目中
注:我下载的是版本是

MySQLDriverCS-n-EasyQueryTools-4.0.1-DotNet2.0.exe
 
using

System;
using

System.Collections.Generic;
using

System.ComponentModel;
using

System.Data;
using

System.Data.Odbc;
using

System.Drawing;
using

System.Linq;
using

System.Text;
using

System.Windows.Forms;
using

MySQLDriverCS;
 
 
namespace

mysql
{
    public
partial
class
Form1
: Form
    {
        public
Form1()
        {
           
InitializeComponent();
        }
 
        private
void
Form1_Load(object
sender, EventArgs
e)
        {
 
           
MySQLConnection
conn = null
;
           
conn = new
MySQLConnection
(new
MySQLConnectionString
("localhost"
, "inv"
, "root"
, "831025"
).AsString);
           
conn.Open();
 
           
MySQLCommand
commn = new
MySQLCommand
("set names gb2312"
, conn);
           
commn.ExecuteNonQuery();
 
           
string
sql = "select * from exchange "
;
           
MySQLDataAdapter
mda =


相关文档:

C#与Flash交互

C#与Flash交互 (转自小磊在线)
C#与Flash交互
前段日子公司要求做一个C#与Flash交互的东西,用来C#与短信猫通讯将数据传到Flash上显示与操作的应用。
第一步C#添加组件
打开VS2005-工具-选择工具箱项-COM组件-选择Shockwave Flash Object-确定
添加好组件往场景上拖放,如果提示注册需求注册
c# 注册控件-在运行输 ......

asp.net c# 数据库备份

protected void btnsearch_ServerClick(object sender, EventArgs e)
    {
        string lujing=this.Text2.Value.ToString().Trim();
        string shujuku = this.jine.Value;
      &nbs ......

ASP.NET与MySql的连接

1.数据连接方式
ASP.NET本身的数据访问ADO.NET不支持对于MySql的连接和查询,但是MySQL官网上均提供了多种ASP.NET连接到MySQL的方式:
(1)ODBC驱动的访问方式:mysql-connector-odbc-5.1.5-win32.msi,ODBC
(2)ADO.NET对于MySQL的访问方式:mysql-connector-net-6.2.2.zip
个人选用的是第二种,感觉方便,和.NET对S ......

ASP.NET C# URL加密解密

需要引用的类名空间
using System.Security.Cryptography;
using System.IO;
using System.text;
 
        /// <summary>
        /// 加密
        // ......

mysql存储过程基本函数


一.字符串类 
CHARSET(str) //返回字串字符集
CONCAT (string2  [,... ]) //连接字串
INSTR (string ,substring ) //返回substring首次在string中出现的位置,不存在返回0
LCASE (string2 ) //转换成小写
LEFT (string2 ,length ) //从string2中的左边起取length个字符
LENGTH (string ) //string长度
LO ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号