PDA

View Full Version : این خطا برای چیه ؟



Aghrab
پنج شنبه 24 شهریور 1384, 11:08 صبح
سلام بر همه اساتید
دوستان می تونند کمکم کنند بگن این خطا برای چیه ممنون




Server Error in '/logo1' Application.

The text, ntext, and image data types cannot be used in the WHERE, HAVING, or ON clause, except with the LIKE or IS NULL predicates.

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: The text, ntext, and image data types cannot be used in the WHERE, HAVING, or ON clause, except with the LIKE or IS NULL predicates.

Source Error:

Line 45: ' ppass.Value = txtpass.TextLine 46: mycon.Open()Line 47: sred = mycom.ExecuteReader(CommandBehavior.CloseConnectio n)Line 48: If Not sred.Read() ThenLine 49: Me.Label1.Text = "Invalid Username Or Password"

Vahid_Keyany
پنج شنبه 24 شهریور 1384, 12:13 عصر
The text, ntext, and image data types cannot be used in the WHERE, HAVING, or ON clause, except with the LIKE or IS NULL predicates.


انواع داده ای text, ntext, image نمیتوانند در قسمت WHERE,HAVING,ON در دستورات شرطی بکار روند مگر در مواردی که از Like یا IS NULL استفاده شود

برای اینکه روی متن ها بتوانید جستجوی فارسی انجام دهید از نوع داده ای NVarChar و شرط LIKE در قسمت WHERE استفاده کنید.

مقدار مورد جستجو را حتما با استفاده از پارامتر بدهید تا به مشکلات بعدی برخورد نکنید.

Aghrab
جمعه 25 شهریور 1384, 09:39 صبح
وحید جان ممنونم ازت میشه یه مثال بزنی ببخشیدا !!