I get the following error about my select query:
Here is the select query in question:
public int countLogin(string username, string password)
{
try
{
int query = (from a in de.userlogin
where a.username == username && a.password == password
select a).Count();
return query;
}
catch (Exception e)
{
MessageBox.Show(e.ToString());
return 0;
}
}
The error said that ntext
cannot be used with order by
or where
clause. Therefore, I am not using ntext
data type in my database scheme
So where did I go wrong ? because there is no varchar
data type
i think this is some bugs, according to the following url
ntext is used to be nvarchar(count or MAX).
Try using varchar(100) instead of nvarchar(100).
Greetz
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.