Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id F0F419FBC76 for ; Wed, 20 Jun 2007 02:20:30 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 02624-04-2 for ; Wed, 20 Jun 2007 02:19:51 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.242]) by postgresql.org (Postfix) with ESMTP id CF26F9FB8D9 for ; Wed, 20 Jun 2007 02:11:35 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so10777ana for ; Tue, 19 Jun 2007 22:11:33 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=gQ4f+E0PQGxix2Jf2GxrzJkgLROs1yQkxHEAw9DRSJIZsFZfbBIsVlfYxrdBqnOP3d7DUrgGod0z02/WM4ujde/jQGHIHrXJvmEH55V3YgJSrauEUoG7xy3Lif1bGtal+bc69Jtbt/0Y5QDrxMKuJasqwA3Q3S5fMqOiEtCz+9U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=o9GkzHdBiuFE9ZMakeui8A/+sQmpGA4HLhvhxbL1jUmc9QmIBNlX3hJwFTBg5jRlLv+aBouSeAJ6lCyC1oYi+eZKPpW7AKfNodWRWGnNIbTXd0Ntf+YtmoYhUFxH44IWiaXwp8j9Ad3cmKQNcFkRb7zGnA5dE25l7TaPzMsjghs= Received: by 10.100.9.19 with SMTP id 19mr154919ani.1182316293182; Tue, 19 Jun 2007 22:11:33 -0700 (PDT) Received: by 10.100.45.15 with HTTP; Tue, 19 Jun 2007 22:11:33 -0700 (PDT) Message-ID: Date: Wed, 20 Jun 2007 05:11:33 +0000 From: "Jaime Casanova" To: "Alvaro Herrera" Subject: Re: Ejecutar \copy desde VB Cc: "Chapilliquen Gutierrez Eduardo" , pgsql-es-ayuda@postgresql.org In-Reply-To: <20070620023536.GA7972@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20070619154020.GO4265@alvh.no-ip.org> <52865C3823D7134E909B33D382298594227B80@srvmail01.mem.int> <20070619171050.GU4265@alvh.no-ip.org> <52865C3823D7134E909B33D382298594227C29@srvmail01.mem.int> <20070619172559.GX4265@alvh.no-ip.org> <20070620000341.GL21268@alvh.no-ip.org> <20070620023536.GA7972@alvh.no-ip.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/479 X-Sequence-Number: 28311 On 6/20/07, Alvaro Herrera wrote: > Jaime Casanova escribi=F3: > > On 6/20/07, Alvaro Herrera wrote: > > >Jaime Casanova escribi=F3: > > > > > >> >Bueno, si no sabes programar en el lenguaje que estas utilizando, n= o es > > >> >en esta lista donde debes consultar. Lo unico que te puedo decir e= s que > > >> >en C lo harias con la rutina PQputCopyData, y terminas con PQputCop= yEnd. > > >> >Esto se hace despues de haber enviado un COPY FROM STDIN. > > >> > > >> en defensa de Chapiliquen dire que VB es un lenguaje facil de usar > > >> hasta que empiezas a hacer un programa real... entonces te das cuent= a > > >> que VB no es lenguaje real... > > > > > >Como no se va a poder hacer una rutina para leer un archivo linea por > > >linea :-( > > > > eso si... enviarlo a STDIN es otro asunto... la mayoria de los que > > usan VB ni siquiera saben que es eso :) > > Ehhh! Pero no necesitas enviarlo a STDIN!! Lo unico que necesitas es > pasarle la linea a PQputCopyEnd. > Claro, a traves de libpq... que no es el caso porque esta conectado a traves de odbc (probablemente, usando ADO) Y creeme trabajar con librerias de terceros en Vb it's a pain in the ;)... por cierto, tendria que abrir una segunda conexion a la base con libpq para poder ejecutar PQputCopyData y PQputCopyEnd? a menos que alguien me diga que se puede usar las funciones de libpq a traves de ADO... --=20 Atentamente, Jaime Casanova "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook