This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I have stored procedure with parameters in my database. I want get meta information about each parameter: name, type (in, out), default value. Can i do it with LightSpeed? |
|
|
Not programatically. The LightSpeed designer obviously contains code to get this info when you drag a procedure onto the design surface, but that's not part of the API and is not part of the LightSpeed redistributable. However, it's easy to extract the information yourself using the OracleConnection.GetSchema method with the "ProcedureParameters" collection name, and using the owner name and procedure name for restriction values: conn.GetSchema("ProcedureParameters", new string[] { "MySchema", "MyProcedure" }); (You can leave out the procedure name restriction to get results for all procedures owned by MySchema.) This returns a DataTable with a row for each parameter, of which the following columns will be of the most interest to you: OBJECT_NAME (the procedure name) ARGUMENT_NAME DATA_TYPE (string; Oracle type name not CLR type) DEFAULT_VALUE IN_OUT (This is the Oracle schema -- other databases will return different columns, and may have to be looked up in different ways.) |
|