Hi,
All.
Actually i m creating a program using C# which connects to the database (oracle) and checks for the given table "OPC_GROUP". if the table doesnt exists then it creates the table
else it updates all field with provided values
I used following command to query
cmd.CommandText = "SELECT tname from tab where tname = 'OPC_GROUP'";
cmd.CommandType = CommandType.Text;
int length = cmd.ExecuteNonQuery();
if (cmd.ExecuteNonQuery() >0)
{
MessageBox.Show("Table does exist");
}
else
MessageBox.Show("Table doesnt exist");
But this code return "TABLE DOESNT EXIST" though table is already created
What i m doing wrong:( :'(
Please help.......... Thnx in advance
Attached is my solution made in vs2005