久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

CLR UDF 返回 Varbinary(MAX)

CLR UDF returning Varbinary(MAX)(CLR UDF 返回 Varbinary(MAX))
本文介紹了CLR UDF 返回 Varbinary(MAX)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

SQL CLR 用戶定義函數是否可以返回數據類型 varbinary(MAX)?

Is it possible for a SQL CLR User-Defined Function to return the data type varbinary(MAX)?

在它提到的文檔中:

標量值函數返回的輸入參數和類型可以是 SQL Server 支持的任何標量數據類型,但 rowversion、text、ntext、image、timestamp、table 或 cursor 除外."- 他們沒有提到 varbinary,但我不確定...

"The input parameters and the type returned from a scalar-valued function can be any of the scalar data types supported by SQL Server, except rowversion, text, ntext, image, timestamp, table, or cursor." - they don't mention varbinary, but I'm not sure...

我有一些來自 .NET 端的字節數組數據,我需要從 CLR 返回到 SQL Server,并且我試圖避免使用來自存儲過程的輸出參數(這就是我現在正在測試中).

I have some byte-array data from the .NET side that I need to return to SQL Server from the CLR, and I'm trying to avoid having to do it with an output parameter from a stored procedure (this is how I have it working in test now).

謝謝!

推薦答案

如果您將其定義為返回一個 SqlBytes 數據類型,這應該正確映射到 SQL Server 中的 varbinary(MAX).

If you define it as returning a SqlBytes data type, this should correctly map to varbinary(MAX) in SQL Server.

[SqlFunction]
public static SqlBytes Function1()
{
    return new SqlBytes(Encoding.UTF8.GetBytes("Hello world."));
}

雖然您也可以使用 SqlBinary 數據類型,如果您通過 Visual Studio 部署,它將映射到 varbinary(8000) 而不是 varbinary(MAX).

Whilst you can also use the SqlBinary data type, if you deploy via Visual Studio, it will be mapped onto varbinary(8000) rather than varbinary(MAX).

這篇關于CLR UDF 返回 Varbinary(MAX)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

What SQL Server Datatype Should I Use To Store A Byte[](我應該使用什么 SQL Server 數據類型來存儲字節 [])
Interpreting type codes in sys.objects in SQL Server(解釋 SQL Server 中 sys.objects 中的類型代碼)
Typeorm .loadRelationCountAndMap returns zeros(Typeorm .loadRelationCountAndMap 返回零)
MS SQL: Should ISDATE() Return quot;1quot; when Cannot Cast as Date?(MS SQL:ISDATE() 是否應該返回“1?什么時候不能投射為日期?)
Converting the name of a day to its integer representation(將一天的名稱轉換為其整數表示)
How to convert nvarchar m/d/yy to mm/dd/yyyy in SQL Server?(如何在 SQL Server 中將 nvarchar m/d/yy 轉換為 mm/dd/yyyy?)
主站蜘蛛池模板: 一级毛毛片 | 日日操夜夜操天天操 | 欧美日本亚洲 | 久久久精品高清 | 日本一区视频在线观看 | 欧美在线观看一区二区 | 亚洲精品乱码久久久久久9色 | 97精品超碰一区二区三区 | 男人视频网站 | 99在线资源 | 久久精品亚洲 | www国产亚洲精品 | 亚洲综合视频一区 | www.国产一区 | 日韩在线第一 | 久久中文高清 | 欧美成人精品一区二区男人看 | 美女在线国产 | 91看国产 | 狠狠色网 | 九色国产 | 91亚洲一区 | 亚洲视频在线观看免费 | 精品三区 | 欧美视频在线免费 | 日韩欧美亚洲一区 | 久久久久久久电影 | 日韩精品一区二区三区中文在线 | 国产超碰人人爽人人做人人爱 | 涩涩视频在线播放 | 亚洲欧美激情精品一区二区 | 国产免费让你躁在线视频 | 九九免费| 男女视频在线观看免费 | 国产成人91视频 | 天天干天天色 | 国产免费a视频 | 欧美中文字幕在线观看 | 狠狠涩| 久久一区精品 | 91传媒在线播放 |