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

Options: ReplyQuote


Subject
Views
Written By
Posted
2876
z d
April 10, 2005 08:44PM
2632
z d
April 20, 2005 05:52AM
Re: Isn't mysql connector .net support GBK?
2503
z d
April 20, 2005 04:09PM


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.