بسم الله الرحمن الرحيم
واجهتني مشكله أثناء برمجتي لموقع ولكن لم أستطع ايجاد حل لها
المشكله كالتالي:
عندي جدول Register في قاعدة البيانات يحتوي على
R_Email
Matric_no
Name
Super1
تصميم الصفحه عن طريق ASP.NET. عند الدخول على الصفحه يقوم المستخدم بتعبئة بياناته من: ايميل, رقم البطاقه, اسم و اسم المشرف تبعه.. وعند الضغط على زر الارسال المفترض ان البيانات ترسل الى الجدول Register. الكود كالتالي:
Dim x As String
x = "insert into Register (R_Email,Matric_No,Name,Super1) values (" + txtFromAddress.Text + ", '" + matric.Text + "','" + name.Text + "','" + super1_name.Text + "')"
SqlDataSource2.InsertCommand = x
SqlDataSource2.Insert()ولكن عند الضغط تظهر الرساله التاليه:
The multi-part identifier "muzamil_2c9@hotmail.com" could not be bound.
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 multi-part identifier "muzamil_2c9@hotmail.com" could not be bound.
Source Error:
Line 27: x = "insert into Register (R_Email,Matric_No,Name,Super1) values (" + txtFromAddress.Text + ", '" + matric.Text + "','" + name.Text + "','" + super1_name.Text + "')"
Line 28: SqlDataSource2.InsertCommand = x
Line 29: SqlDataSource2.Insert()حاولت فيها ولكن للأسف بدون نتيجه ايجابيه في الموضوع, مع العلم ان امر التخزين بسيط ومافيه اي تعقيد لذلك لم استطع حل المشكله
اتمنى الاقي عندكم الاجابه
تقبلوا تحياتي
