X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0EFA9D1B1A5 for ; Fri, 25 Jun 2004 09:17:46 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 59667-06 for ; Fri, 25 Jun 2004 12:17:40 +0000 (GMT) Received: from web40701.mail.yahoo.com (web40701.mail.yahoo.com [66.218.78.158]) by svr1.postgresql.org (Postfix) with SMTP id 78082D1B18C for ; Fri, 25 Jun 2004 09:17:35 -0300 (ADT) Message-ID: <20040625121738.24339.qmail@web40701.mail.yahoo.com> Received: from [200.163.192.124] by web40701.mail.yahoo.com via HTTP; Fri, 25 Jun 2004 09:17:38 ART Date: Fri, 25 Jun 2004 09:17:38 -0300 (ART) From: "=?iso-8859-1?q?Eduardo=20S.=20Fontanetti?=" Subject: Re: Insert binary data on postgre To: pgsql-admin@postgresql.org In-Reply-To: <1088134084.2640.7.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=4.6 tagged_above=0.0 required=5.0 tests=RCVD_IN_DSBL, RCVD_IN_NJABL, RCVD_IN_NJABL_PROXY, RCVD_IN_SORBS, RCVD_IN_SORBS_HTTP, RCVD_IN_SORBS_SOCKS X-Spam-Level: **** X-Archive-Number: 200406/332 X-Sequence-Number: 13992 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 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/