On Fri, Jun 26, 2009 at 6:52 AM, Jiri Cincura <disk...@cincura.net> wrote:
>
> On Thu, Jun 25, 2009 at 14:36, Sam Carleton<scarle...@miltonstreet.com> wrote:
> > What I cannot figure out is how to make this call as a query on my
> > typed dataset, aka allow the Firebird DDEX to generate the code.  In
>
> What code? If you simply put it into SelectCommand, that's it.

First off, the baseline... The following works correctly in IBConsole:

SELECT * FROM GET_TARGETTABLE_BY_ID_SP( 3, 1);

What I do is this:

1: Open the .xsd file (this has all the UI representation of the typed
DataSet.  It is being created thanks to the Firebird DDEX)
2: Right click on the TableAdapter that has a DataTable with the same
set of columns as the stored proc will return.
3: Select Add Query
4: Select "Use exiting stored procedure" and select the correct stored
proc on the next screen and finally select Tabular data on the last
screen

These sets the property of the command text to the name of the stored
proc and the type is StoredProcedure.  It does not work when I run it.
 When I change the CommandText to "SELECT * FROM
GET_TARGETTABLE_BY_ID_SP( ?, ?)" and the CommandType to Text, the IDE
does not understand the two parameters.

Like I said before, when I go in and code up the FbCommand by hand and
set the CommandText to "SELECT * FROM GET_TARGETTABLE_BY_ID_SP( ?,
?)", CommandType to Text, and set the parameters manually, it works
fine.  I am looking to do this via the IDE.

> > the end, most all the calls to the database will be parametrized SP
> > that return dataset's, so figuring out how to do this with DDEX is
> > somewhat important :)
>
> DDEX has nothing to do with datasets.

You know what, I am no database guru, nor have I ever been all the
great with words.  What I know is this:  The DDEX is what is allowing
me to add lots of typed "stuff" (DataSets, DataAdapters, DataTables,
or what ever you want to call it) to a .xsd file quick and easy.  The
goal is to move away from accessing the tables directly and getting
all the 'collections of rows'  (cursor, data set, row set, rows, what
ever it is called in this Firebird world) via stored proc.  Further
more, the goal is to generate and manage all this code with the .xsd
file.  It was my understanding that the DDEX is what aloud one to
create and manage the .xsd file, if I am wrong, please let me know.

Sam

------------------------------------------------------------------------------
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to