什么是最大SqlDbType.VarBinary大小? [英] what is the maximum SqlDbType.VarBinary size?
本文介绍了什么是最大SqlDbType.VarBinary大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在c# SqlDbType.VarBinary
最大尺寸= 8000参数;
如何插入450mb文件?
in c# SqlDbType.VarBinary
maximum size=8000 for parameter;
how do i insert a 450mb file?
byte[] Myfile=.....;
Myquery= "insert into Table1(VarBinMaxfile,name) values(@file,"name1");
cmd.Parameters.add(@file,SqlDbType.VarBinary,8000).value=Myfile;
推荐答案
尝试阅读 TSQL varbinary type [ ^ ]下次。
该字段可以用数字定义,从1开始到8000,或者用max
,最多可以是2 ^ 31-1个字节,或2,147,483,647个字节。
您在代码中使用的内容完全取决于数据库中列的定义方式。
Try reading the documentation on the TSQL varbinary type[^] next time.
The field can be defined with a number, from 1 to 8000, or withmax
, which can be up to 2^31-1 bytes, or 2,147,483,647 bytes.
What you use in your code depends entirely on how the column is defined in your database.
这篇关于什么是最大SqlDbType.VarBinary大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文