Hi all!
I want to save some .exe files in a database, but I dont get this BLOB thing
How do I declare a BLOB in the database table and as a variable in a stored
procedure?
Regards
Marre
BLOB (Binary Large OBject) is a general term. You will find no data type in
SQL that is a blob per say. Depending on the version of SQL, you should be
using an "image" field (2000) or varbinary(MAX) in SQL 2005.
-Andrew
"Marre" <news@.supremelink.se> wrote in message
news:uPTPLqS4FHA.1864@.TK2MSFTNGP12.phx.gbl...
> Hi all!
> I want to save some .exe files in a database, but I dont get this BLOB
> thing
> How do I declare a BLOB in the database table and as a variable in a
> stored procedure?
>
> Regards
> Marre
>
|||Hi Andrew!
Thanx for youre answer! As I understand it, i can use binary and varbinary
for files up to 8kb and if I want to work with larger files, I should use
Image.
Does this sound right to you?
Regards
Marre
"Andrew Robinson" <nemoby@.nospam.nospam> wrote in message
news:ugA$rmV4FHA.1276@.TK2MSFTNGP09.phx.gbl...
> BLOB (Binary Large OBject) is a general term. You will find no data type
> in SQL that is a blob per say. Depending on the version of SQL, you should
> be using an "image" field (2000) or varbinary(MAX) in SQL 2005.
> -Andrew
> "Marre" <news@.supremelink.se> wrote in message
> news:uPTPLqS4FHA.1864@.TK2MSFTNGP12.phx.gbl...
>
|||Yes.
Image and VARCHAR(MAX) / VARBINARY(MAX) have a performace hit. Store it in a
varbinary(8000) if you can.
-A
"Marre" <news@.supremelink.se> wrote in message
news:%23awky%23f4FHA.3276@.TK2MSFTNGP10.phx.gbl...
> Hi Andrew!
> Thanx for youre answer! As I understand it, i can use binary and varbinary
> for files up to 8kb and if I want to work with larger files, I should use
> Image.
> Does this sound right to you?
> Regards
> Marre
> "Andrew Robinson" <nemoby@.nospam.nospam> wrote in message
> news:ugA$rmV4FHA.1276@.TK2MSFTNGP09.phx.gbl...
>
|||Thank you for helping me out here!
/Marre
"Andrew Robinson" <nemoby@.nospam.nospam> wrote in message
news:%23zaMkhn4FHA.472@.TK2MSFTNGP15.phx.gbl...
> Yes.
> Image and VARCHAR(MAX) / VARBINARY(MAX) have a performace hit. Store it in
> a varbinary(8000) if you can.
> -A
> "Marre" <news@.supremelink.se> wrote in message
> news:%23awky%23f4FHA.3276@.TK2MSFTNGP10.phx.gbl...
>
|||Can you give more info on the performance hit?
Thanks.
"Andrew Robinson" wrote:
> Yes.
> Image and VARCHAR(MAX) / VARBINARY(MAX) have a performace hit. Store it in a
> varbinary(8000) if you can.
> -A
> "Marre" <news@.supremelink.se> wrote in message
> news:%23awky%23f4FHA.3276@.TK2MSFTNGP10.phx.gbl...
>
>
|||"yluo" <yluo@.plexus-group.net> wrote in message
news:0818E574-53A7-4936-9C36-CA8BC3F2B957@.microsoft.com...[vbcol=seagreen]
> Can you give more info on the performance hit?
> Thanks.
>
> "Andrew Robinson" wrote:
A varbinary(8000) column will live on the data page itself as part of the
row.
VARCHAR(MAX) and VARBINARY(MAX) will use BLOB objects. In the row itself,
a 16-byte pointer will now point at separate data pages which store the BLOB
object.
That = more reads, possibly more unused space etc.
Rick Sawtell
MCT, MCSD, MCDBA
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment