通过存储过程发送大变量的权限 (SQL Server)
我想不出一种方法可以通过调用存储过程一次接收超过 4000 个字节。我在表中存储的图像每个大约 15 - 20 KB,但是在获取它们并将它们显示到页面上时,它们的大小始终恰好是 3.91 KB(或 4000 字节)。
存储过程对一次可以发送的数据量有限制吗?我仔细检查了我的数据,确实只收到了 varbinary(MAX)
字段中的前 4000 个字符。
是否有权限设置允许一次超过 4k 字节?
I can't figure out a way to allow more than 4000 bytes to be received at once via a call to a stored procedure. I am storing images in the table that are around 15 - 20 kilobytes each, but upon getting them and displaying them to the page, they are always exactly 3.91 KB in size (or 4000 bytes).
Do stored procedures have a limit on how much data can be sent at once? I double-checked my data, and I am indeed only receiving the first 4000 characters from the varbinary(MAX)
field.
Is there a permission setting to allow more than 4k bytes at once?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您应该阅读使用大值数据类型
如果您无法传递超过 4000 字节,我会检查您的客户端应用程序,看看它是否限制或截断您的数据。 SQL Server 一次可以占用超过 4000 个字节。
编辑刚刚发现:
执行 (Transact-SQL)
You should read Using Large-Value Data Types
If you can't pass more than 4000 bytes, I'd check in your client application to see if it is limiting or truncating your data. SQL Server can take more than 4000 bytes at one time.
EDIT just found this:
EXECUTE (Transact-SQL)
您需要使用不同的代码来访问 SQL Server 中的 BLOB。示例此处。
You need to use different code to access BLOBs in SQL Server. Example here.
SQL Server 2005 中有一种称为“图像”的数据类型。您应该使用该数据类型来存储大型二进制对象,尤其是图像。
There is a data type called "image" in SQL Server 2005. You should use that data type to store large binary object especially images.