如题:
MySQLConnection con = new MySQLConnection( new MySQLConnectionString("localhost","beephpcms","root","root").AsString);
try
{
DataSet ds = new DataSet();
con.Open();
MySQLCommand cmd = new MySQLCommand("set names 'gb2312'", con);
cmd.ExecuteNonQuery();
MySQLCommand com = new MySQLCommand("select contentid as id,content from phpcms_c_news where content like '%news_%html%'", con);
MySQLDataReader mydr = com.ExecuteReaderEx();
while (mydr.Read())
{
string content = "";
string id = "";
id = mydr["id"].ToString();
content=mydr["content"].ToString();//此行报错,content是mediumtext类型数据
}
mydr.Close();
con.Close();
}
catch (Exception error)
{
MessageBox.Show(error.Message);
}请指点如何读取mediumtext类型数据
MySQLConnection con = new MySQLConnection( new MySQLConnectionString("localhost","beephpcms","root","root").AsString);
try
{
DataSet ds = new DataSet();
con.Open();
MySQLCommand cmd = new MySQLCommand("set names 'gb2312'", con);
cmd.ExecuteNonQuery();
MySQLCommand com = new MySQLCommand("select contentid as id,content from phpcms_c_news where content like '%news_%html%'", con);
MySQLDataReader mydr = com.ExecuteReaderEx();
while (mydr.Read())
{
string content = "";
string id = "";
id = mydr["id"].ToString();
content=mydr["content"].ToString();//此行报错,content是mediumtext类型数据
}
mydr.Close();
con.Close();
}
catch (Exception error)
{
MessageBox.Show(error.Message);
}请指点如何读取mediumtext类型数据
解决方案 »
- 请教一个关于SQL子查询问题??求大神!!!
- java程序备份postgresql 怎么调用?
- postgresql如何操作二维数组
- 求一个SQL,对你来说很简单的,thanks
- 初学MYSQL,请大大们介绍本好书!!!
- 求助: 未知数据库表的性能结构是否有问题?
- 一个简单的问题。。。
- 本地Win98+Apache+mysql+php4,怎样获得mysql用户名、密码和数据库库名?
- 我可不可以用这样一个组合?? JSP + MYSQL + Liunx ???????
- mysql workbench 停止工作
- 没招了,字符集换不过来,高手进来解答一下!
- mysql 有没有把整数直接转为日期的用法
改成
byte[] content