fomidvar
سه شنبه 20 بهمن 1388, 21:31 عصر
سلام
من در پروژه ام با adodc و با پایگاه داده ACCESS کار میکنم.موقع اضافه کردن رکورد به جدول با این خطا روبه رو میشم .منظور این خطا چیه؟ البته اگه منظورش اینه که داده تکراری میدم اصلا من برای فیلد کلیدم داده تکراری نمیدم
run-time error '-2147467259(80004005)':
the changes you requested to the table were not successful because
they would creat duplicate values in the index, primary key , or
relationship.change the data in the field or fields that contain
duplicat data ,remove the index ,or redefine the index to permit
duplicate entries and try again
کد اضافه کردن رکورد به جدول
Adodc1.Recordset.MoveLast
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields!code_k = text1.Text
Adodc1.Recordset.Fields!name_k = Text2.Text
Adodc1.Recordset.Fields!tedad_km = text3.Text
Adodc1.Recordset.Fields!noghtesefaresh = text4.Text
Adodc1.Recordset.Fields!vahed_k = text5.Text
Adodc1.Recordset.Fields!barcode = Text6.Text
Adodc1.Recordset.Update
Adodc1.Refresh
در ضمن یک کد جستجو بر اساس نام هم می خواهم که بعد از آن هر کدام از فیلدهای رکوردست را در TEXTBOXمشخص شده بریزه.لطفا راهنماییم کنید
من در پروژه ام با adodc و با پایگاه داده ACCESS کار میکنم.موقع اضافه کردن رکورد به جدول با این خطا روبه رو میشم .منظور این خطا چیه؟ البته اگه منظورش اینه که داده تکراری میدم اصلا من برای فیلد کلیدم داده تکراری نمیدم
run-time error '-2147467259(80004005)':
the changes you requested to the table were not successful because
they would creat duplicate values in the index, primary key , or
relationship.change the data in the field or fields that contain
duplicat data ,remove the index ,or redefine the index to permit
duplicate entries and try again
کد اضافه کردن رکورد به جدول
Adodc1.Recordset.MoveLast
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields!code_k = text1.Text
Adodc1.Recordset.Fields!name_k = Text2.Text
Adodc1.Recordset.Fields!tedad_km = text3.Text
Adodc1.Recordset.Fields!noghtesefaresh = text4.Text
Adodc1.Recordset.Fields!vahed_k = text5.Text
Adodc1.Recordset.Fields!barcode = Text6.Text
Adodc1.Recordset.Update
Adodc1.Refresh
در ضمن یک کد جستجو بر اساس نام هم می خواهم که بعد از آن هر کدام از فیلدهای رکوردست را در TEXTBOXمشخص شده بریزه.لطفا راهنماییم کنید