如何在Winforms中使用C#在mysql中插入图像? [英] how to insert image in mysql using c# in winforms?
本文介绍了如何在Winforms中使用C#在mysql中插入图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用MySql网站上提供的这段代码.
http://dev.mysql.com/doc/refman/5.0/zh/connector-net-programming-blob.html
现在错误是''文件不能为空''
我附加了一个文件,即JPG文件
文件大小可以.文件名可以.但是会引发异常文件不能为空"
在高级Thnx:)
I am using this code which is available in MySql site.
http://dev.mysql.com/doc/refman/5.0/en/connector-net-programming-blob.html
now the error is '' File can''t be null ''
I attached a file i.e. JPG file
Filesize is ok..filename is ok..but it throws an exception ''File can''t be null''
Thnx in advanced :)
推荐答案
再次检查您提供的代码是否匹配.在没有确切看到您正在运行的代码片段的情况下,我们只能猜测您的问题是什么.最好的猜测是:您在复制代码时错过了某些内容,或者您没有正确使用它.
Double check your code matches that they gave. Without seeing exactly the code fragment you are running we can only guess what your problem is. And the best guess is: You missed something when you copied the code, or you aren''t using it correctly.
阅读以下内容:
http://support.microsoft.com/kb/309158 [ http://bytes.com/topic/net/answers/768002-blob-mysql- using-c [^ ]
http://www.velocityreviews.com/forums/t73483-save-blob-to-file-from-mysql-using-c.html [
Read the following :
http://support.microsoft.com/kb/309158[^]
http://bytes.com/topic/net/answers/768002-blob-mysql-using-c[^]
http://www.velocityreviews.com/forums/t73483-save-blob-to-file-from-mysql-using-c.html[^]
这篇关于如何在Winforms中使用C#在mysql中插入图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文