🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

4 total messages Started by John A. Simpson Tue, 26 Nov 1996 00:00
Storing JPEGs in a SQL Server database
#581
Author: John A. Simpson
Date: Tue, 26 Nov 1996 00:00
9 lines
1440 bytes
I need some code or information on how to store JPEG graphic files in a SQL 
Server database.  Any help would be greatly appreciated.

Thanks...


- John A. Simpson       email:  jsimpson@i1.net
                    home page:  http://www.i1.net/~jsimpson
Re: Storing JPEGs in a SQL Server database
#582
Author: Pete Nelson
Date: Tue, 26 Nov 1996 00:00
20 lines
1861 bytes
On Tue, 26 Nov 96 15:01:52 GMT, jsimpson@i1.net (John A. Simpson) wrote:

>I need some code or information on how to store JPEG graphic files in a SQL 
>Server database.  Any help would be greatly appreciated.

I've done it through Microsoft Access.  Create a table with an image
datatyped field, then through a linked table in Access, insert an
object.

Now, how would I go about adding JPEGs through some sort of batch
process (BCP, etc)?


====================================================================
 Pete Nelson <weasel@ecis.com>                  "My knees are cold."
 PGP 0x734EF061 FP: 91 C8 14 9D B5 2F AE 0A  69 DA E0 CE 5D C6 41 B1
 http://www.ecis.com/~weasel - Home of the Tech's Support Page, A-10
 Warthog Territory, Glocks in Movies & TV, Weasel's wcCODE Archive
====================================================================
Re: Storing JPEGs in a SQL Server database
#583
Author: Brian Elliott
Date: Tue, 26 Nov 1996 00:00
33 lines
2206 bytes
When you use Access to store images in SQL Server, you need to use Access
to get them out.

Access wraps the images in OLE.

You need to strip away the OLE stuff to use it in other situations.

   --- Brian

Pete Nelson <weasel@ecis.com> wrote in article
<329f5c7d.12840812@gateway>...
> On Tue, 26 Nov 96 15:01:52 GMT, jsimpson@i1.net (John A. Simpson) wrote:
> 
> >I need some code or information on how to store JPEG graphic files in a
SQL 
> >Server database.  Any help would be greatly appreciated.
> 
> I've done it through Microsoft Access.  Create a table with an image
> datatyped field, then through a linked table in Access, insert an
> object.
> 
> Now, how would I go about adding JPEGs through some sort of batch
> process (BCP, etc)?
> 
> 
> ====================================================================
>  Pete Nelson <weasel@ecis.com>                  "My knees are cold."
>  PGP 0x734EF061 FP: 91 C8 14 9D B5 2F AE 0A  69 DA E0 CE 5D C6 41 B1
>  http://www.ecis.com/~weasel - Home of the Tech's Support Page, A-10
>  Warthog Territory, Glocks in Movies & TV, Weasel's wcCODE Archive
> ====================================================================
> 
Re: Storing JPEGs in a SQL Server database
#584
Author: Andreas Pohlke
Date: Wed, 27 Nov 1996 00:00
38 lines
2726 bytes
John A. Simpson wrote:
> I need some code or information on how to store JPEG graphic files in a SQL
> Server database.  Any help would be greatly appreciated.

It depends on how you access the DBS. The IMAGE datatype stores
"something
binary" and does not determine the file format.
There are ways to use an INSERT to insert the binary data with a string
and SELECT returns an amount of binary data.
In JDBC/ODBC the type TEXT is handled with Sting types, which are
interpreted as being binary data too (according to Transact SQL). Try to
insert data by giving a String type which contains the raw data. Vice
versa,
try to fetch the image data into a String. Use stored procedures to
encapsulate the transaction? (How to cast a String to an image container
is yet another problem...and depends on your access method.)
(For hints on MS Acces read the other replies.)
In the near future we are going to have these problems using JBBC/ODBC
to store GIF/JPEG images in MS SQL-Server 6.5 (these formats, since
Java supports them).

I'll keep your question in mind.

Greetings,
Andreas.

-- 
Andreas Pohlke                               Siemens AG, PN GS 375
Andreas.Pohlke@pn-msmail.bln.siemens.net     Berlin S
Intranet: http://198.7.1.105                 Tel: (+49 30) 386 27610
"Der Daten sind genug gewechselt - nun lasst Informationen folgen!"
--
Andreas Pohlke                               Free University of Berlin
pohlke@inf.fu-berlin.de                      Insitute of Computer
Sciences
http://www.inf.fu-berlin.de/~pohlke          Berlin, Germany
"Superstition brings bad luck"
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads