我的存储过程如下:
create proc procInsertReport(@ReportName char(50),
                             @ReportContent image,
                             @DataSource char(30),
                             @ReportDescription char(60)) 
as
insert into Report(ReportName,ReportContent,DataSource,ReportDescription)
values(@ReportName,@ReportContent,@DataSource,@ReportDescription)我给@ReportContent参数赋的值是一个byte数组,大小是4兆。
插入的时候竟然报出下面的错误:
            由Byte[]向String转换错误。
希望高手帮忙解决下。

解决方案 »

  1.   

    数据库里面ReportContent栏位是什么类型,
    好像你中间出现了隐式转换.
      

  2.   

    byte数组 <--> image <--> string,这些可以转么?
    检查你程序端参数的赋值,
    程序端尽力使用和数据库,存储过程端一样的数据类型,否则出现隐式转换,有时候会报错!
      

  3.   


    sql server 没有数组的概念.
      

  4.   

    我是把一个文件独到子节数组里然后再把值付给@ReportContent的,不然怎么弄啊???
      

  5.   

    byte[]  <--> string