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: Update string too long?
    ... search through the newsgroups, as wells as google.com for the web. ... Pro SQL Server 2000 Database Design - ... Beginner posts are the most helpful and it is ... what is the data type and length for the ...
    (microsoft.public.sqlserver.programming)
  • Re: How Can I Write a SQL Server Function that Returns a Memo Data Type in Access?
    ... When I use the function in a view and link to the view through ODBC, ... Text data type. ... LONGTEXT, LONGCHAR, MEMO, and NOTE aren't recognized by SQL Server. ...
    (comp.databases.ms-access)