From: | Edwin Quijada <listas_quijada(at)hotmail(dot)com> |
---|---|
To: | <gilberto(dot)castillo(at)etecsa(dot)cu>, <pgsql-es-ayuda(at)postgresql(dot)org> |
Subject: | RE: Ejecutar copy con stdin en vb6 |
Date: | 2011-10-12 17:15:03 |
Message-ID: | BAY155-W59ADAC8BC11E30DFDF143FE3E30@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Eso no te va a funcionar desde VB el COPY NO ES de SQL eso solo existe en el cliente psql y lo haces en pgadmin porque el lo que hace es que invoca a psql pero desde ODBC no podras usarlo como te dijeron
*-------------------------------------------------------*
*-Edwin Quijada
*-Developer DataBase
*-JQ Microsistemas
*-Soporte PostgreSQL
*-www.jqmicrosistemas.com
*-809-849-8087
*-------------------------------------------------------*
Subject: Re: [pgsql-es-ayuda] Ejecutar copy con stdin en vb6
From: gilberto(dot)castillo(at)etecsa(dot)cu
To: pgsql-es-ayuda(at)postgresql(dot)org
Date: Tue, 11 Oct 2011 13:04:53 -0400
El mar, 11-10-2011 a las 17:32 +0100, Alejandro Carrillo escribió:
> Si lo soporta:
>
>
> Dim c As ADODB.Connection
> Dim cmd As ADODB.Command
> Dim std As clsStdIO
> Set c = New ADODB.Connection
> Set std = New clsStdIO
> Set cmd = New ADODB.Command
> c.Open "Provider=MSDASQL.1;Persist Security Info=False;Extended
> Properties=""DRIVER={PostgreSQL
> Unicode};DATABASE=postgres;SERVER=172.18.22.101;PORT=5432;UID=postgres;pwd=Aa987;SSLmode=disable;ReadOnly=0;Protocol=7.4-1;FakeOidIndex=0;ShowOidColumn=0;RowVersioning=0;ShowSystemTables=0;ConnSettings=;Fetch=100;Socket=4096;UnknownSizes=0;MaxVarcharSize=255;MaxLongVarcharSize=8190;Debug=0;CommLog=0;Optimizer=0;Ksqo=1;UseDeclareFetch=0;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;BoolsAsChar=0;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;LFConversion=1;UpdatableCursors=1;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBinary=0;UseServerSidePrepare=0;LowerCaseIdentifier=0;GssAuthUseGSS=0;XaOpt=1"""
> cmd.ActiveConnection = c
> 'cmd.Parameters.Append cmd.CreateParameter(, adLongVarWChar,
> adParamInput, 4000, "hola;jaja")
> cmd.CommandText = "COPY dato FROM stdin"
> cmd.Execute
>
Dos ejemplos de la Orden COPY
COPY dato FROM "/path/to/file" USING DELIMITERS '\t' WITH NULL AS
'NULL';
COPY (SELECT * FROM tabla WHERE valor LIKE '%') TO "/path/to/file.csv"
WITH NULL AS 'NULL' CSV HEADER QUOTE AS '"';
--
Saludos,
Gilberto Castillo
Edificio Beijing. Miramar Trade Center. Etecsa.
Miramar, La Habana.Cuba.
---
This message was processed by Kaspersky Mail Gateway 5.6.28/RELEASE running at host imx3.etecsa.cu
Visit our web-site: ,
-
Enviado a la lista de correo pgsql-es-ayuda (pgsql-es-ayuda(at)postgresql(dot)org)
Para cambiar tu suscripci�n:
http://www.postgresql.org/mailpref/pgsql-es-ayuda
From | Date | Subject | |
---|---|---|---|
Next Message | Edwin Quijada | 2011-10-12 17:21:26 | RE: timeout en delete de tabla grande |
Previous Message | Alvaro Herrera | 2011-10-12 15:20:52 | Re: urgente!!! |