M
Mich
Hi,
the table 'l0382_project1' exists in sql server. I can see it.
Now in asp.net, i want to check whether it exists but i get "invalid column
name":
1st attempt:
comd.CommandText = "SELECT COUNT(*) FROM sys.tables WHERE [name] =
[l0382_project1]"
connection.Open()
nr = comd.ExecuteScalar()
Invalid column name 'l0382_project1'.
2nd attempt:
comd.CommandText = "SELECT COUNT(*) FROM sys.tables WHERE [name] =
['l0382_project1']"
connection.Open()
nr = comd.ExecuteScalar()
Invalid column name 'l0382_project1'.
Could somebody tell me the right syntax, please?
Thanks
Mich
the table 'l0382_project1' exists in sql server. I can see it.
Now in asp.net, i want to check whether it exists but i get "invalid column
name":
1st attempt:
comd.CommandText = "SELECT COUNT(*) FROM sys.tables WHERE [name] =
[l0382_project1]"
connection.Open()
nr = comd.ExecuteScalar()
Invalid column name 'l0382_project1'.
2nd attempt:
comd.CommandText = "SELECT COUNT(*) FROM sys.tables WHERE [name] =
['l0382_project1']"
connection.Open()
nr = comd.ExecuteScalar()
Invalid column name 'l0382_project1'.
Could somebody tell me the right syntax, please?
Thanks
Mich