我用 C# 做的 WEB 程序代码如下:
SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
myConnection.Open();
string sql = "select * from warehouse where accountid='test'";
SqlCommand myCommand = new SqlCommand(sql,myConnection);
SqlDataReader dr = myCommand.ExecuteReader();
if (dr.Read())
{
string temp = dr["items"].ToString();
Response.Write(temp);
}
不行。
3 个解决方案
#1
请各位大大帮忙啊。。
#2
http://community.csdn.net/Expert/TopicView.asp?id=3514667
#3
我还是没搞定..把图片存入 IMAGE 类型的字段.或取出来存为图片都没问题.但是我怎么把这个字段的内容直接显示出来呢??
我的意思是.直接把 BINARY 字段里面的这样的内容读取.并且显示出来.
0xCE000100823E40800000CD000100823D09800000B0208000822BB880F27CB01080004B1E6B803E00CD0001007EAFC68030DDCF0001000000008020288F00000002092480FFFF8F00000002092D80F377CE000100823EB9800000CE0001004B35CD800000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
我的意思是.直接把 BINARY 字段里面的这样的内容读取.并且显示出来.
0xCE000100823E40800000CD000100823D09800000B0208000822BB880F27CB01080004B1E6B803E00CD0001007EAFC68030DDCF0001000000008020288F00000002092480FFFF8F00000002092D80F377CE000100823EB9800000CE0001004B35CD800000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
#1
请各位大大帮忙啊。。
#2
http://community.csdn.net/Expert/TopicView.asp?id=3514667
#3
我还是没搞定..把图片存入 IMAGE 类型的字段.或取出来存为图片都没问题.但是我怎么把这个字段的内容直接显示出来呢??
我的意思是.直接把 BINARY 字段里面的这样的内容读取.并且显示出来.
0xCE000100823E40800000CD000100823D09800000B0208000822BB880F27CB01080004B1E6B803E00CD0001007EAFC68030DDCF0001000000008020288F00000002092480FFFF8F00000002092D80F377CE000100823EB9800000CE0001004B35CD800000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
我的意思是.直接把 BINARY 字段里面的这样的内容读取.并且显示出来.
0xCE000100823E40800000CD000100823D09800000B0208000822BB880F27CB01080004B1E6B803E00CD0001007EAFC68030DDCF0001000000008020288F00000002092480FFFF8F00000002092D80F377CE000100823EB9800000CE0001004B35CD800000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF