pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
To: pgsql-admin@postgresql.org
Subject: Re: Insert binary data on postgre
Date: Fri, 25 Jun 2004 09:43:09 -0300 (ART)
Message-ID: <20040625124309.92102.qmail@web40712.mail.yahoo.com> (raw)
In-Reply-To: <20040625121738.24339.qmail@web40701.mail.yahoo.com>

I forgot a little, or better, a big detail, to do this
translating from binary to ANSI of a file with 100Kb,
it will return something like 500000 bytes, and this
process is very, very and very slow. Then I need to
use another way.

I've tried to use the Replace native function from the
VB to put a backslash before the ' on the string, but
it hadn't worked, I think it don't interprets the
character like postgres. Somebody knows how to solve
it? How to identify the character exactly like the
postgres?

Thanks
Eduardo

--- "Eduardo S. Fontanetti" <dufuzzy@yahoo.com.br>
escreveu: > I am using bytea data type and Visual
Basic 6.
> 
> I saw in another place, that I can insert byte
> values
> in the Postgre with a double backslash, then I used
> a
> function to translate the binary string to ANSI
> string. Then I can use: \\001\\010\\047 ...
> 
> Somebody could say me if its right?
> 
> Eduardo
> 
> --- mike g <mike@thegodshalls.com> escreveu: > What
> data type did you use to define the binary
> > column?  bytea or LO?
> > 
> > On Thu, 2004-06-24 at 14:16, Eduardo S. Fontanetti
> > wrote:
> > > How can I do to put a file into the PostgreSQL ?
> I
> > > have got the contents of file in binary yet and
> > put on
> > > a String on my APP, but when I try to insert it
> on
> > > postgre, it returns to me:
> > > 
> > > ERROR: parser: unterminated quoted string at or
> > near
> > > "BMæ»' at character 90
> > > 
> > > My string:
> > > 
> > > ConnP.Execute "insert into fotossocios(arquivo)
> > > values('" & Conteudo & "')"
> > > 
> > > Could somebody help me how to construct the
> right
> > > string ?
> > > 
> > > Thanks
> > > Eduardo
> > > 
> > >
> >
>
______________________________________________________________________
> > > 
> > > Yahoo! Mail - agora com 100MB de espaço,
> > anti-spam e antivírus grátis!
> > > http://br.info.mail.yahoo.com/
> > > 
> > > ---------------------------(end of
> > broadcast)---------------------------
> > > TIP 5: Have you checked our extensive FAQ?
> > > 
> > >               
> > http://www.postgresql.org/docs/faqs/FAQ.html
> > 
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please
> > send an appropriate
> >       subscribe-nomail command to
> > majordomo@postgresql.org so that your
> >       message can get through to the mailing list
> > cleanly
> >  
> 
>
______________________________________________________________________
> 
> Yahoo! Mail - agora com 100MB de espaço, anti-spam e
> antivírus grátis!
> http://br.info.mail.yahoo.com/
> 
> ---------------------------(end of
> broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose
> an index scan if your
>       joining column's datatypes do not match
>  

______________________________________________________________________

Yahoo! Mail - agora com 100MB de espaço, anti-spam e antivírus grátis!
http://br.info.mail.yahoo.com/



view thread (9+ messages)  latest in thread

Message-ID: <20040625124309.92102.qmail@web40712.mail.yahoo.com>
Permalink:  ../20040625124309.92102.qmail@web40712.mail.yahoo.com/
Also on:    postgresql.org/message-id/20040625124309.92102.qmail@web40712.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: dufuzzy@yahoo.com.br
  Subject: Re: Insert binary data on postgre
  In-Reply-To: <20040625124309.92102.qmail@web40712.mail.yahoo.com>
  References: <20040625121738.24339.qmail@web40701.mail.yahoo.com> <20040625124309.92102.qmail@web40712.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox