From: nicoya n. <nic...@ho...> - 2003-10-10 15:28:41
|
Hi, I need to use dataapater to fill an dataset with a select stored procedures (retrieve rows). May I need to add the "Select * FROM " to my select stored procedures? Look this: --------------------------------------------------------------- CREATE PROCEDURE PA_PAIS_CONSULTAR RETURNS ( CODIGO INTEGER, NOMBRE VARCHAR (20)) AS begin for select Id, Pais from Paises into :Codigo, :Nombre DO SUSPEND; end string Conexion = "Database=C:\\Bases\\PACHACAMAC.GDB;User=SYSDBA...."; string SQL = "SELECT * FROM PA_PAIS_CONSULTAR"; <<<------- DataSet DS = new DataSet(); FbConnection FCon = new FbConnection(Conexion); FbCommand FCD = new FbCommand(SQL,FCon); FCD.CommandType = System.Data.CommandType.StoredProcedure; FbDataAdapter FDA = new FbDataAdapter(FCD); FDA.Fill(DS); this.dataGrid1.DataSource = DS; --------------------------------------------------------------- I want this: --------------------------------------------------------------- string Conexion = "Database=C:\\Bases\\PACHACAMAC.GDB;User=SYSDBA...."; string SQL = "PA_PAIS_CONSULTAR"; <<<------- DataSet DS = new DataSet(); FbConnection FCon = new FbConnection(Conexion); FbCommand FCD = new FbCommand(SQL,FCon); FCD.CommandType = System.Data.CommandType.StoredProcedure; FbDataAdapter FDA = new FbDataAdapter(FCD); FDA.Fill(DS); this.dataGrid1.DataSource = DS; --------------------------------------------------------------- It is possible? It will be posible? :D I think that make FB more easy to use a chanche to. You may think this a less important topic, but i really want it wil be possible beacuese i use an business rules layer y my sqlserver projects that abstract all data access using stored procedures with datasets to provide diferent numbers of parameters and create its, And build the stored procedures names, etc. I really good thing :D Thanks. _________________________________________________________________ Consigue aquí las mejores y mas recientes ofertas de trabajo en América Latina y USA: www.yupimsn.com/empleos |