Last post Apr 11, 2019 09:34 AM by Jenifer Jiang
Apr 10, 2019 10:55 AM|alihusain_77|LINK
I have a multiline textbox. This textbox could have data entry of one thousands line of texts of letters, numbers and symbols. What I am doing is that I pass the entered value to function that decrypt it and save it in a variable of Byte data type. However,
this could put limitation because the Byte maximum value could be less that the size of the decrypted data entry. So what is the data type that I can use that can contain the very maximum value of Byte? Shortly what is the correspondent datatype of database
Apr 10, 2019 11:13 AM|PatriceSc|LINK
Do it the other way round ie what is the size you expect to have to deal with ? varbinary(max) is exposed as a byte array (technically speaking you could go up to 2 Gb so I would expect this limitation being quite theorical).
You could try
https://docs.microsoft.com/en-us/sql/sql-server/sql-server-technical-documentation?toc=..%2Ftoc%2Ftoc.json&view=sql-server-2017 first for your SQL Server questions...
Apr 10, 2019 11:15 AM|mgebhard|LINK
Reading the openly published docs really helps.
VARCHAR(MAX) = 2GB.
BINARY(n) is a fixed size column where n can be 1 to 8,000 (2GB).
VARCHAR is use for character data. BINARY is used to store items that are not character data like binary files.
Apr 11, 2019 09:34 AM|Jenifer Jiang|LINK
VARBINARY(max) in MSSQL refers to:
Variable-length binary data.
max indicates that the maximum storage size is 2^31-1 bytes.
For more, you could refer to: