23-03-2012, 10:17 PM
mobile كتب :في حدث ادراج سجل بجدولك اي AfterInsertاخى كريم لقد ظهر خطا مكرار فما الذى حصل لقد اضفت بيانات اخرى
اضف query
كود :
MyTable1.Open;
MyTable1.Append;
MyTable1.FieldValues['name']:=Edit1.text;
MyTable1.FieldValues['age']:=ComboBox19.text;
MyTable1.FieldValues['job']:=Edit4.text;
MyTable1.FieldValues['adress']:=ComboBox20.text;
MyTable1.FieldValues['phone number']:=ComboBox5.text;
MyTable1.FieldValues['sex']:=ComboBox1.text;
MyTable1.FieldValues['Marital Status']:=ComboBox2.text;
MyTable1.FieldValues['Sexual']:=ComboBox3.text;
MyTable1.FieldValues['Religion']:=ComboBox4.text;
MyTable1.FieldByName('time').AsDateTime:=StrToDate(FormatDateTime('dd/mm/yyyy',DateTimePicker1.date));
MyTable1.FieldValues['Location']:=ComboBox21.text;
MyTable1.FieldValues['Detective']:=Edit5.text;
MyTable1.FieldValues['relationship pain']:=ComboBox22.text;
MyTable1.FieldValues['pain']:=ComboBox23.text;
MyTable1.FieldValues['Location1']:=ComboBox24.text;
MyTable1.FieldByName('time2').AsDateTime:=StrToDate(FormatDateTime('dd/mm/yyyy',DateTimePicker2.date));
MyTable1.FieldValues['Location 2']:=ComboBox25.text;
MyTable1.FieldValues['Any activity related to pain']:=Edit12.text;
MyTable1.FieldValues['natural']:=ComboBox26.text;
MyTable1.FieldValues['the power of pain']:=ComboBox27.text;
MyTable1.FieldValues['types of liquids']:=ComboBox28.text;
MyTable1.FieldValues['Content']:=ComboBox29.text;
MyTable1.FieldValues['Location3']:=ComboBox7.text;
MyTable1.FieldValues['Place channels']:=ComboBox8.text;
MyTable1.FieldValues['Exit liquid']:=ComboBox9.text;
MyTable1.FieldValues['Signs of inflammation']:=ComboBox10.text;
MyTable1.FieldValues['Lymphatic glands']:=ComboBox11.text;
MyTable1.FieldValues['Pain2']:=ComboBox12.text;
MyTable1.FieldValues['Heart disease']:=memo2.text;
MyTable1.FieldValues['Chest']:=memo3.text;
MyTable1.FieldValues['Digestive ']:=memo4.text;
MyTable1.FieldValues['Tract ']:=memo5.text;
MyTable1.FieldValues['Nerves ']:=memo6.text;
MyTable1.FieldValues['Endocrinology ']:=memo7.text;
MyTable1.FieldValues['Motor ']:=memo8.text;
MyTable1.FieldValues['Sugar ']:=ComboBox13.text;
MyTable1.FieldValues['Pressure ']:=ComboBox14.text;
MyTable1.FieldValues['Crisis']:=ComboBox15.text;
MyTable1.FieldValues['Heart disease']:=ComboBox16.text;
MyTable1.FieldValues['Gerhat breast ancient']:=edit9.text;
MyTable1.FieldValues['Gerhat ovaries ancient']:=edit2.text;
MyTable1.FieldValues['Gerhat and other ancient']:=edit6.text;
MyTable1.FieldValues['The pill']:=ComboBox17.text;
MyTable1.FieldByName('time11').AsDateTime:=StrToDate(FormatDateTime('dd/mm/yyyy',DateTimePicker3.date));
MyTable1.FieldValues['Hormone therapy']:=ComboBox18.text;
MyTable1.FieldValues['Name of the medicine']:=edit10.text;
MyTable1.FieldValues['Duration of treatment']:=edit11.text;
MyTable1.FieldByName('time12').AsDateTime:=StrToDate(FormatDateTime('dd/mm/yyyy',DateTimePicker4.date));
MyTable1.FieldValues['The same disease in the family']:=ComboBox30.text;
MyTable1.FieldValues['Other types of cancer family']:=memo1.text;
MyTable1.FieldValues['Age at puberty']:=edit7.text;
MyTable1.FieldValues['Age at menopause']:=edit8.text;
MyTable1.FieldValues['Age first pregnancy']:=edit13.text;
MyTable1.FieldValues['Alradah']:=ComboBox32.text;
MyTable1.FieldValues['Public']:=edit14.text;
MyTable1.FieldValues['Private']:=edit35.text;
MyTable1.FieldValues['Asamthery']:=edit15.text;
MyTable1.FieldValues['Great']:=edit16.text;
MyTable1.FieldValues['Skin bump']:=edit17.text;
MyTable1.FieldValues['Mass']:=ComboBox33.text;
MyTable1.FieldValues['lymph glands']:=edit18.text;
MyTable1.FieldValues['move']:=ComboBox34.text;
MyTable1.FieldValues['Adhesion']:=ComboBox35.text;
MyTable1.FieldValues['Group']:=edit19.text;
MyTable1.FieldValues['The rest of the equipment']:=edit20.text;
MyTable1.FieldValues['waves']:=edit21.text;
MyTable1.FieldValues['Breast-ray']:=edit22.text;
MyTable1.FieldValues['MRI']:=edit23.text;
MyTable1.FieldValues['Sample']:=edit24.text;
MyTable1.FieldValues['Surgical specimen']:=edit25.text;
MyTable1.FieldValues['Hormonal receptors']:=ComboBox36.text;
MyTable1.FieldValues['Diagnosis']:=edit26.text;
MyTable1.FieldValues['Stages']:=ComboBox37.text;
MyTable1.FieldValues['Stages1']:=ComboBox38.text;
MyTable1.FieldByName('time13').AsDateTime:=StrToDate(FormatDateTime('dd/mm/yyyy',DateTimePicker5.date));
MyTable1.FieldValues['Details']:=edit28.text;
MyTable1.FieldValues['Complications']:=edit29.text;
MyTable1.FieldValues['Type']:=edit27.text;
MyTable1.FieldValues['time14']:=edit30.text;
MyTable1.FieldValues['Number of Courses']:=edit31.text;
MyTable1.FieldValues['Type2']:=edit32.text;
MyTable1.FieldValues['time15']:=edit33.text;
MyTable1.FieldValues['Number of Courses2']:=edit34.text;
MyTable1.FieldValues['Number of Courses3']:=edit36.text;
MyTable1.FieldValues['time16']:=edit7.text;
MyTable1.FieldValues['Other types of cancer family']:=memo9.text;
MyTable1.Post;
MyTable1.Close;
ShowMessage('Êã ÊÎÒíä ÇáÈíÇäÇÊ');
FORM3.SHOW;
Hide;وشكر على ********

