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 0D1C4D1B209 for ; Fri, 25 Jun 2004 11:21:52 -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 27288-06 for ; Fri, 25 Jun 2004 14:21:47 +0000 (GMT) Received: from mxc.pcnet.ro (unknown [82.137.14.5]) by svr1.postgresql.org (Postfix) with ESMTP id C6F32D1B1A9 for ; Fri, 25 Jun 2004 11:21:39 -0300 (ADT) Received: from aldratech.com (aldratech.com.pcnet.ro [213.154.158.58] (may be forged)) by mxc.pcnet.ro (8.12.10/8.12.10) with ESMTP id i5PELWPY021535 for ; Fri, 25 Jun 2004 17:21:40 +0300 Received: from aldratech.com ([192.168.0.6]) by aldratech.com for with eXtremail; Fri, 25 Jun 2004 17:21:34 +3GMT Message-ID: <40DC358C.2090109@aldratech.com> Date: Fri, 25 Jun 2004 17:24:12 +0300 From: Radu-Adrian Popescu Reply-To: radu.popescu@aldratech.com Organization: Aldratech Ltd. User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.6) Gecko/20040510 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Eduardo S. Fontanetti" Cc: pgsql-admin@postgresql.org Subject: Re: Insert binary data on postgre References: <20040625124309.92102.qmail@web40712.mail.yahoo.com> In-Reply-To: <20040625124309.92102.qmail@web40712.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/334 X-Sequence-Number: 13994 Eduardo S. Fontanetti wrote: > 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? > Check out http://www.postgresql.org/docs/7.4/interactive/libpq-exec.html#LIBPQ-EXEC-ESCAPE-BYTEA The escape functions are located in the libpq library (PostgreSQL's native C library), that has a Windows native port. You may either look at the code and implement that in VB (don't think it will perform very well though) or write a COM wrapper or something like that to make those functions available in VB. Best of luck, -- Radu-Adrian Popescu CSA, DBA, Developer Aldrapay MD Aldratech Ltd. +40213212243