GeneBe
asked on
Check if table exit using datalayer in oracle
I use datalayer In VS C# to create table but I drop the table first. I get an error if the table does not exist and give the drop command. . Dtaaccess.dtabase.execute( drop table tablename)
What is the datalayer method to check if table exist?
What is the datalayer method to check if table exist?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you!
I am not sure which kind of datalayer you have in place so I would suggest a generic way out. You can execute this statement to confirm if the table exists or not.
Open in new window
Use above SQL command and execute it using ExecuteReader, and check if the reader.HasRows is true or not. This way you can confirm if the table exists or not.
Regards,
Chinmay.