From: Rod C. <rod...@cl...> - 2003-08-05 12:40:49
|
Hello again, Now that I've got a stored procedure to fill a DataSet I've moved onto deriving the parameters for a stored procedure. I've got a stored procedure that has two input and two output parameters. The only way I've managed to derive the parameters is using the following code... FbTransaction transaction = connection.BeginTransaction(); FbCommand cmd = new FbCommand("execute procedure test_derive(?,?)", connection, transaction); cmd.CommandType = System.Data.CommandType.StoredProcedure; FbCommandBuilder.DeriveParameters(cmd); Ideally I would like to be able to derive the parameters without having to know anything about the parameters in advance, this is possible with the SQL Server and Oracle data providers but I can't find a way to do it using Firebird. Many thanks Rod. --------------------------------------------------------------------------------------------------------------- Clearswift monitors, controls and protects all its messaging traffic in compliance with its corporate email policy using Clearswift products. Find out more about Clearswift, its solutions and services at www.clearswift.com. *********************************************************************************** This communication is confidential and may contain privileged information intended solely for the named addressee(s). It may not be used or disclosed except for the purpose for which it has been sent. If you are not the intended recipient, you must not copy, distribute or take any action in reliance on it. Unless expressly stated, opinions in this message are those of the individual sender and not of Clearswift. If you have received this communication in error, please notify Clearswift by emailing su...@cl... quoting the sender and delete the message and any attached documents. Clearswift accepts no liability or responsibility for any onward transmission or use of emails and attachments having left the Clearswift domain. This footnote confirms that this email message has been swept by MIMEsweeper for Content Security threats, including computer viruses. |
From: Jack <sof...@di...> - 2003-09-26 07:46:01
|
Hello, When I use the function "FbCommandBuilder.DeriveParameters(command)" to get the parameters of a Stored Procedure, I expected to have the input parameters before and after the output parameters, but the parameters are mixed. For instance for a stored procedure with several input parameters and with one output parameter, as first I find the first input parameter followed by the output parameter and then the other input paramaters. Is this the correct behaviour? Thanks, Jack |
From: Carlos G. A. <car...@te...> - 2003-09-26 09:16:51
|
Hello: > When I use the function "FbCommandBuilder.DeriveParameters(command)" to get > the parameters of a Stored Procedure, I expected to have the input > parameters before and after the output parameters, but the parameters are > mixed. For instance for a stored procedure with several input parameters and > with one output parameter, as first I find the first input parameter > followed by the output parameter and then the other input paramaters. > > Is this the correct behaviour? If you are using version 1.5 it can be :) i'm using this to retrieve parameter information: DataTable spSchema = command.Connection.GetDbSchemaTable(FbDbSchemaType.Procedure_Parameters, new object[] {command.CommandText}); This execs a select against rdb$procedure_parameter table ordered by: rdb$procedure_name rdb$parameter_number I'm going to make a test using this in the ORDER BY clausule : rdb$procedure_name rdb$parameter_type rdb$parameter_number -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From: Carlos G. A. <car...@te...> - 2003-09-26 10:00:04
|
Hello: > I'm going to make a test using this in the ORDER BY clausule : > > rdb$procedure_name > rdb$parameter_type > rdb$parameter_number Change is in CVS yet. -- Best regards Carlos Guzmán Álvarez Vigo-Spain |
From: Carlos G. A. <car...@te...> - 2003-08-05 13:48:10
|
Hello: > Ideally I would like to be able to derive the parameters without having to > know anything about the parameters in advance, this is possible with the SQL > Server and Oracle data providers but I can't find a way to do it using > Firebird. If i understand well you want to derive parameters from anything like this: FbCommand cmd = new FbCommand("execute procedure test_derive", connection, transaction); If i'm rigth the only way i know for this is to extract parameters from database metadata, this would be easy to implement in 1.5 version ( it has clases for extract schema information ), i'm rigth ?? Ideas and comments are wellcome :) -- Best regards Carlos Guzmán Álvarez Vigo-Spain |