to:gOODiDEA(无语) ( ) 我只显示一张图片 to:saucer(思归, MS .NET MVP): 我发现原因了,相同的一张图片首次上传,即id为1的时候,就是全部的数据,而,当以后再上传的时候,上传的数据就少了很大一截.不知道为什么
I have no idea, check to see if you have enough memory, also set executionTimeout larger, like<configuration> <system.web> <httpRuntime maxRequestLength="10000" useFullyQualifiedRedirectUrl="true" executionTimeout="900"/> </system.web> </configuration>orServer.ScriptTimeout = 120;
to:saucer(思归, MS .NET MVP): 像那样设了一下,也不行 Hashtable ht=new Hashtable(); ht.Add("imgtype",imgType); ht.Add("content",imgData); ht.Add("returnvalue",null); int id=CM.ExecuteNoResult_sp_id("upimage",ht); 都用的是这一段,仅仅成功插入了第一条记录,然后再也不成了,经测试,imgDataTemp(一byte数组)完完整整的是图片数据,id是返回刚刚插入的图片的id值,能正确得到 存储过程如下: CREATE PROCEDURE upimage (@imgtype varchar(50),@content image,@returnvalue int output) ASbegin insert into 相片数据 values(@imgtype,@content); select @returnvalue=max(id) from 相片数据; end GO
我只显示一张图片
to:saucer(思归, MS .NET MVP):
我发现原因了,相同的一张图片首次上传,即id为1的时候,就是全部的数据,而,当以后再上传的时候,上传的数据就少了很大一截.不知道为什么
<system.web>
<httpRuntime maxRequestLength="10000"
useFullyQualifiedRedirectUrl="true"
executionTimeout="900"/>
</system.web>
</configuration>orServer.ScriptTimeout = 120;
像那样设了一下,也不行
Hashtable ht=new Hashtable();
ht.Add("imgtype",imgType);
ht.Add("content",imgData);
ht.Add("returnvalue",null);
int id=CM.ExecuteNoResult_sp_id("upimage",ht);
都用的是这一段,仅仅成功插入了第一条记录,然后再也不成了,经测试,imgDataTemp(一byte数组)完完整整的是图片数据,id是返回刚刚插入的图片的id值,能正确得到
存储过程如下:
CREATE PROCEDURE upimage (@imgtype varchar(50),@content image,@returnvalue int output)
ASbegin
insert into 相片数据 values(@imgtype,@content);
select @returnvalue=max(id) from 相片数据;
end
GO
我读取没有问题,是上传到数据库有问题