سؤال

I am getting error in the sql statement.

("server= RAJ-PC\SQLEXPRESS; user id=sa; password=as64ws; database=onlineshopping", "select * from customer where userid='" + TextBox1.Text + "', password='" + TextBox2.Text + "'");

I have written this statement to connect to SQL Server. Error is shown in the SQL statement near password.. What is my error???

هل كانت مفيدة؟

المحلول

Multiple where clauses are combined using AND, not ,.

("server= RAJ-PC\SQLEXPRESS; user id=sa; password=as64ws; database=onlineshopping", "select * from customer where userid='" + TextBox1.Text + "' AND password='" + TextBox2.Text + "'");
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top