From: Carlos G. A. <car...@te...> - 2003-08-15 17:06:56
|
Hello: I have added to the CVS the changes for implment the new Stored procedure execution format (i need to make more tests on it :)). With this changes you can exec an stored proc as: FbCommand command = new FbCommand("GETVARCHARFIELD", connection); command.CommandType = CommandType.StoredProcedure; command.Parameters.Add("@ID", FbDbType.Integer).Value = 1; command.Parameters.Add("@RESULT", FbDbType.VarChar).Direction = ParameterDirection.Output; command.ExecuteNonQuery(); command.Dispose(); This will change the command text as: execute procedure GETVARCHARFIELD(@ID) Other form will be: FbCommand command = new FbCommand("GETVARCHARFIELD", connection); command.CommandType = CommandType.StoredProcedure; command.Parameters.Add("@ID", FbDbType.Integer).Value = 1; FbDataReader reader = command.ExecuteReader(); command.Dispose(); This will change the command text as: select * from GETVARCHARFIELD(@ID) If the command text starts with "execute proecdure " or "select " nothing will be changed. Comments and ideas are wellcome !! -- Best regards Carlos Guzmán Álvarez Vigo-Spain |