Pat,
One of the options you may wish to explore is acquiring the Database
Schema for all, or a specific, procedure. Use the
OLEDBConnection::GetOleDbSchemaTable to retrieve the database schema.
For the OLEDBSchemaGuid use the Procedure_Parameters enumeration.
For example, to get a listing of all the procedure's and their
parameters issue a call like:
OleDbConnection1.GetOleDbSchemaTable(OleDb.OleDbSchemaGuid.Procedure_Par
ameters, Nothing)
The second argument is an array of restriction values. To get the
parameters for the CustOrders procedure from the northind database issue
this method call:
OleDbConnection1.GetOleDbSchemaTable
(OleDb.OleDbSchemaGuid.Procedure_Parameters, New Object() {Nothing,
Nothing, "CustOrderHist"})
The return value is a DataTable which you can inspect to determine the
parameter names and their data types. The above code snippet assumes
that OleDbConnection1 is open and has a valid db connection.
Hope this helps.
Craig.
-----Original Message-----
From: Pat Hastings [mailto:pat.hastings@s...]
Sent: Thursday, May 16, 2002 8:51 AM
To: ASPX_Professional
Subject: [aspx_professional] command.parameters.refresh
HI,
Afraid this is another one of those "how do you do it in .net then?"
questions.
Pre .net when you were calling stored procedures which required
parameters to be passed in you could quite easily find the correct
values for all the types etc of the parameters by doing a
command.parameters.refresh which would go to the database get the values
it needed and populate the parameters collection for you.
Anyone know how to do this in dotnet? I had a nice little asp page which
would automatically write the asp code for accessing the stored
procedures and would really like to ba able to write an aspx one.
PAt