Re: Isn't mysql connector .net support GBK?
Posted by:
z d
Date: April 20, 2005 04:09PM
<%@ Import NameSpace="MySql.Data.MySqlClient" %>
<script language="C#" runat="server">
private void Page_Load(object sender, EventArgs e)
{
MySqlConnection conn = new MySqlConnection("Data Source=localhost;User Id=root;Password=root;CharSet=gbk");
MySqlCommand comm = new MySqlCommand("create database mydatabase DEFAULT CHARACTER SET gbk",conn);
conn.Open();
comm.ExecuteNonQuery();
comm.CommandText = "use mydatabase";
comm.ExecuteNonQuery();
comm.CommandText = "create table t1 (a varchar(20)) ";
comm.ExecuteNonQuery();
conn.Close();
}
</script>
<html>
<link href="css.aspx" type="text/css" rel="stylesheet">
<body>
Session.SessionID:
<%=Session.SessionID %>
</body>
</html>
my.ini
default-character-set=gbk
Subject
Views
Written By
Posted
2876
April 10, 2005 08:44PM
2122
April 12, 2005 08:06AM
2632
April 20, 2005 05:52AM
2145
April 20, 2005 11:11AM
Re: Isn't mysql connector .net support GBK?
2503
April 20, 2005 04:09PM
1915
May 03, 2005 10:55AM
2059
September 21, 2005 02:40AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.