Page 1 of 1

DESC Table

Posted: Fri 05 Jan 2007 14:00
by benbahrenburg
Hi,

Can OraDirect fill a dataset or datareader with a command similar to DESC EMP or DESCRIBE EMP ?

I'm looking for away to use the native desribe command within an application.

DESC Table Statement

Posted: Sat 06 Jan 2007 07:04
by benbahrenburg
Hi,
Thanks for your help. I get the following when trying to run a describe statement ORA-00900: invalid SQL statement.

Below is the sample code I used. Is there special syntax to have a desc statement work?


public void ReadMyData(string myConnString)
{
string mySelectQuery = "DESC EMP";
OracleConnection myConnection = new OracleConnection(myConnString);
OracleCommand myCommand = new OracleCommand(mySelectQuery,myConnection);
myConnection.Open();
try
{
OracleDataReader myReader = myCommand.ExecuteReader();
while (myReader.Read())
{
Console.WriteLine(myReader.GetValue(0));
}
myReader.Close();
}
finally
{
myConnection.Close();
}
}

Posted: Tue 09 Jan 2007 07:54
by Alexey
Unfortunately, OraDirect .NET doesn't support SQL*Plus commands.