6
Answers

Checking if a table exists

Rakefet

Rakefet

19y
18.4k
1
Hi,
I am creating a SQL Server tables programmatically in C#. I want to check first if a table exists and only if it doesn't exist, create one. I was looking around but I couln't find an easy way to do so.
Any ideas?
Thanks a lot ,
Rakefet
Answers (6)
1
Amit Gupta

Amit Gupta

NA 16.5k 25.7k 7y
Have you tried checking running the same in sql with the same credentials and servername? Have a look to this link https://blog.devoworx.net/2017/01/30/connection-timeout-expired-pre-login-handshake/amp/
Accepted
0
Umer Ali

Umer Ali

NA 65 1.3k 7y
yes when i login to sql server management it connects