Syntax Error with Database Login System
Created a website login system but when I run it it keeps coming up with this error to the particular bit of coding below. Can someone PLEASE help me with this Error message on this particular code: System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'user'. Code: public static User LoginUser(string login, string password) { //Check if user exists string query = string.Format("SELECT COUNT(*) FROM TeesDB.dbo.user WHERE name = '{0}'", login); command.CommandText = query; try { conn.Open(); int amountOfUsers = (int) command.ExecuteScalar(); if(amountOfUsers == 1) { //User