Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

sql query

$
0
0

An expression of non-boolean type specified in a context where a condition is expected, near 'Name'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Data.SqlClient.SqlException: An expression of non-boolean type specified in a context where a condition is expected, near 'Name'.

Source Error: 
Line 18:             string checkuser = "select count(*) from UserData where User Name='" + TextBox1.Text + "'";
Line 19:             SqlCommand com = new SqlCommand(checkuser, conn);Line 20:             int temp = Convert.ToInt32(com.ExecuteScalar().ToString());Line 21:             if (temp == 1)
Line 22:             {

Source File: c:\Users\bastin\Documents\Visual Studio 2012\WebSites\WebSite7\RegistrationModule.aspx.cs    Line: 20 

Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>