The data types text and nvarchar are incompatible in the equal to operator.

  • Thread starter Thread starter TakeshiKitano
  • Start date Start date
T

TakeshiKitano

Guest
Hi all,

I really dont know where a mistake in my code ...

using (SqlCommand cmd = new SqlCommand("SELECT * FROM mac_adresa WHERE mac = @Mac;", con))
{
string mac = GetMACAddress();
cmd.Parameters.AddWithValue("@Mac", mac);
SqlDataReader dr = cmd.ExecuteReader();
...


and error message is in title: The data types text and nvarchar are incompatible in the equal to operator.

Please help.

Continue reading...
 
Back
Top