DESC Table

DESC Table

Postby 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

Postby 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();
}
}
benbahrenburg
 
Posts: 25
Joined: Mon 02 Oct 2006 19:15

Postby Alexey » Tue 09 Jan 2007 07:54

Unfortunately, OraDirect .NET doesn't support SQL*Plus commands.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for Oracle