Re: Blob field



Hi,

What data type should I use in SQL Server 2000 to define BLOB ?
Image ?
Or varBinary ?

"Alan" <alanpltseNOSPAM@xxxxxxxxxxxx> wrote in message
news:447f7a76@xxxxxxxxxxxxxxxxxxxxxxxxx
Thanks

"Steve Zimmelman" <skz@xxxxxxxxxxxxxxxxxx> wrote in message
news:447f078d$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi Alan,

You can use something like this:



TBlobField(ADODataSet.FieldByName('DocField')).LoadFromFile('c:\docfile.doc'
)

or

AStream := TMemoryStream.Create ;
AStream.LoadFromFile('MyDoc.doc')
AStream.Position := 0 ;
TBlobField(ADODataSet.FieldByName('DocField')).LoadFromStream(AStream)
AStream.Free

// save the doc to a file

TBlobField(ADODataSet.FieldByName('DocField')).SaveToFile('c:\MyDoc.Doc')

// save to a stream
TBlobField(ADODataSet.FieldByName('DocField')).SaveToStream(AStream);


-Steve-

"Alan" <alanpltseNOSPAM@xxxxxxxxxxxx> wrote in message
news:447e98be@xxxxxxxxxxxxxxxxxxxxxxxxx
What would be the code in like:
ADODataSet.FieldByName('DocField').AsBlob := ....

What would be on the right side ?



"Mike Shkolnik" <mshkolnik2002@xxxxxxx> wrote in message
news:447e80c3@xxxxxxxxxxxxxxxxxxxxxxxxx
You need create the field with IMAGE type

--
With best regards, Mike Shkolnik
E-mail: mshkolnik@xxxxxxxxxxxxx
WEB: http://www.scalabium.com

"Alan" <alanpltseNOSPAM@xxxxxxxxxxxx> wrote in message
news:447e8003$1@xxxxxxxxxxxxxxxxxxxxxxxxx
How do I create a blob field in a SQL Server 2000 table and store
data
into
it? Like store word document into this column ?












.



Relevant Pages

  • Re: Saving image data type record to computer
    ... word BLOB kept coming up. ... a binary data object is known as a binary ... the data types that SQL Server can use for BLOB storage. ... simpler if I save the word doc as a binary data type instead of image. ...
    (microsoft.public.access.formscoding)
  • Re: Access 97 to SQL
    ... The timestamp is a data type, ... the timestamp field does not need to be part of the SELECT ... > converted the Access tables to a SQL Server 2000 database and linked the ... > the way I set up Autonumbering in SQL? ...
    (microsoft.public.access.externaldata)
  • Re: Data Types
    ... > moved to SQL Server and I don't know the best newsgroups yet. ... > Does a Unique Identifier data type take up less storage space than a 32 ... A uniqueidentifier uses 16 bytes. ... but I'm looking at the data types and think that the TimeStamp ...
    (microsoft.public.sqlserver.programming)
  • Re: The tricky thing is that you can even multiply by numeric to make it
    ... Arithmetic overflow error converting expression to data type numeric. ... I'm using SQL Server 2008 version 10.50.1600. ... I have been trying to use the ROUND() function: ... Is an expression of the exact numeric or approximate numeric data type category, except for the bit data type. ...
    (microsoft.public.sqlserver.programming)
  • Re: Recordset Update Error
    ... SQL Server bit fields need to be declared as ... Add a timestamp field to each table. ... The timestamp is a data type, ... 'Opens Recordset ...
    (microsoft.public.access.externaldata)