Skip site navigation (1) Skip section navigation (2)

Re: Insert binary data on postgre

From: Eduardo S(dot) Fontanetti <dufuzzy(at)yahoo(dot)com(dot)br>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Insert binary data on postgre
Date: 2004-06-25 12:17:38
Message-ID: 20040625121738.24339.qmail@web40701.mail.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-admin
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(at)thegodshalls(dot)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(at)postgresql(dot)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/

In response to

Responses

pgsql-admin by date

Next:From: Eduardo S. FontanettiDate: 2004-06-25 12:43:09
Subject: Re: Insert binary data on postgre
Previous:From: Radu-Adrian PopescuDate: 2004-06-25 09:11:00
Subject: Re: Insert binary data on postgre

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group