Check if table exists in c#

Posted by apoorv020 on Stack Overflow See other posts from Stack Overflow or by apoorv020
Published on 2010-06-11T06:33:57Z Indexed on 2010/06/11 6:42 UTC
Read the original article Hit count: 288

Filed under:
|

I want to read data from a table whose name is supplied by a user. So before actually starting to read data, I want to check if the database exists or not.

I have seen several pieces of code on the NET which claim to do this. However, they all seem to be work only for SQL server, or for mysql, or some other implementation. Is there not a generic way to do this?

(I am already seperately checking if I can connect to the supplied database, so I'm fairly certain that a connection can be opened to the database.)

© Stack Overflow or respective owner

Related posts about c#

Related posts about sql