Ayuda con una Funcion plpgsql

From: Fernando Siguenza <fsigu(at)hotmail(dot)com>
To: Foro Postgres <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Ayuda con una Funcion plpgsql
Date: 2008-10-13 14:32:39
Message-ID: BAY114-W54FD7D3F17F7B46BD11144A1360@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda


Amigos como estan , necesito su ayuda estoy empezando con lo de las funciones en postgree y punto net, y tengo un problema con una no se si me pueden ayudar

cuando ejecuto la funcion desde c# me sale este error ERROR: 42601: syntax error at or near ")"

esta es la funcion que utilizo:

CREATE OR REPLACE FUNCTION "master"."AsientosDetalleElimina" (vAgeCod varchar,vAsiDoc varchar, vAsiNum varchar) RETURNS boolean AS $$
BEGIN
delete from asidet where asiagecod=vAgeCod and asidoc=vAsiDoc and asinum=vAsiNum;
return true;
END;
$$
LANGUAGE 'plpgsql';

Desde punto net le llamo asi a la funcion.

comando = new NpgsqlCommand("AsientosDetalleElimina)", cnpg);
comando.CommandType = CommandType.StoredProcedure;
comando.Parameters.Add(new NpgsqlParameter("@age", NpgsqlDbType.Varchar, 3)).Value = agencia;
comando.Parameters.Add(new NpgsqlParameter("@doc", NpgsqlDbType.Varchar, 2)).Value = tipdoc;
comando.Parameters.Add(new NpgsqlParameter("@num", NpgsqlDbType.Varchar, 7)).Value = numero;
comando.Parameters[0].Direction = ParameterDirection.Input;
comando.Parameters[1].Direction = ParameterDirection.Input;
comando.Parameters[2].Direction = ParameterDirection.Input;
comando.ExecuteNonQuery();

y justo en la ultima linea me da el error.

Otra duda que tengo puedo mandar como parametro un datatable completo y recibirlo como cursor en una funcion de postgree, para manipularlo desde la funcion. Ojala y me puedan ayudar

_________________________________________________________________
Get Windows Live and get whatever you need, wherever you are. Start here.
http://www.windowslive.com/default.html?ocid=TXT_TAGLM_WL_Home_082008

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Juan Ramirez 2008-10-13 15:06:49 RE: Ayuda con una Funcion plpgsql
Previous Message Rodriguez Fernando 2008-10-13 14:16:25 Re: autovacuum en 4.3.3