如何将图像保存到数据库 [英] how save image to database
本文介绍了如何将图像保存到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用此代码
Image = mstream.toarray();
Sqlstr =插入stble(图像)值(¿)
Wcmd = new oledbcommand(sqlstr,con);
Wcmd.parameters.add(@ images,oledbtype.binary).value = image;
Wcmd .executenonquery();
这段代码说错误。
帮助我。
I use this code
Image=mstream.toarray();
Sqlstr ="insert into stble(image) values (¿)"
Wcmd=new oledbcommand(sqlstr,con);
Wcmd.parameters.add("@images",oledbtype.binary).value=image;
Wcmd.executenonquery();
This code said error.
Help me.
推荐答案
请参阅:为什么我得到参数无效。我从数据库中读取图像时出现异常? [ ^ ] - 它解释了它。
See here: Why do I get a "Parameter is not valid." exception when I read an image from my database?[^] - it explains it.
这篇关于如何将图像保存到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文