بسم الله الرحمن الرحيم ..
السلام عليكم ورحمة الله وبركاته ..
هذه المشكلة ظهرت لي وحاول أحلها ولكن ( مبتدأ) ...
هذا الكود المستخدم
strSQL = "DELETE FROM Products WHERE Prd_ID='" + lblPrdId.Text + "')" conn = New Data.SqlClient.SqlConnection(strCon) Try conn.Open() command = New Data.SqlClient.SqlCommand(strSQL, conn) command.ExecuteNonQuery() conn.Close() Catch ex As Exception Throw ex End Try
وهذه رسالة الخطأ :
اقتباسIncorrect syntax near ')'.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: Incorrect syntax near ')'.
فأين وما هو الحل (( طلعت روحي )) ..
لكم شكري مقدما ..