P
Paul Riddington
I am writing a tool that will (hopefully) be able to query
any database and retrieve tables, views and stored proc's
along with their columns, parameters etc.
I have been successfull so far using the
GetOleDbSchemaTable method on the OleDbConnection object
as shown below...
schemaTable = cnn.GetOleDbSchemaTable
(OleDbSchemaGuid.Procedure_Columns, new Object[] {null,
null, "sp_Test", null});
However, this specific code (used to retrieve the columns
returned from a stored procedure fails with the message:
"The Procedure_Columns OleDbSchemaGuid is not a supported
schema by the '[provider name]' provider."
I believe this is because I have MDAC 2.7 installed.
The following URL
(http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/cpref/html/frlrfsystemdataoledboledbschemaguidclassproce
dure_columnstopic.asp) has the the comment...
"Note The Procedure_Columns schema is not supported by any
OLE DB providers that ship in MDAC version 2.7. Refer to
your database documentation to determine whether you can
retrieve this schema information by querying the system
tables of your database."
I have found numerous posts on using SQL Server specific
commands to achieve this but wondered if there is a more
generic approach that I can use to cover numerous
databases? Also, why have microsoft stopped supporting the
Procedure_Columns query in the latest release of MDAC?
any database and retrieve tables, views and stored proc's
along with their columns, parameters etc.
I have been successfull so far using the
GetOleDbSchemaTable method on the OleDbConnection object
as shown below...
schemaTable = cnn.GetOleDbSchemaTable
(OleDbSchemaGuid.Procedure_Columns, new Object[] {null,
null, "sp_Test", null});
However, this specific code (used to retrieve the columns
returned from a stored procedure fails with the message:
"The Procedure_Columns OleDbSchemaGuid is not a supported
schema by the '[provider name]' provider."
I believe this is because I have MDAC 2.7 installed.
The following URL
(http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/cpref/html/frlrfsystemdataoledboledbschemaguidclassproce
dure_columnstopic.asp) has the the comment...
"Note The Procedure_Columns schema is not supported by any
OLE DB providers that ship in MDAC version 2.7. Refer to
your database documentation to determine whether you can
retrieve this schema information by querying the system
tables of your database."
I have found numerous posts on using SQL Server specific
commands to achieve this but wondered if there is a more
generic approach that I can use to cover numerous
databases? Also, why have microsoft stopped supporting the
Procedure_Columns query in the latest release of MDAC?