DESC Table

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
benbahrenburg
Posts: 25
Joined: Mon 02 Oct 2006 19:15

DESC Table

Post by benbahrenburg » Fri 05 Jan 2007 14:00

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.

benbahrenburg
Posts: 25
Joined: Mon 02 Oct 2006 19:15

DESC Table Statement

Post by benbahrenburg » Sat 06 Jan 2007 07:04

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();
}
}

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 09 Jan 2007 07:54

Unfortunately, OraDirect .NET doesn't support SQL*Plus commands.

Post Reply