السلام عليكم ورحمة الله وبركاته
البرنامج يعمل بشكل ممتاز ما عدا التعديل يرفض
ولا أعلم ما السبب هل هو من الكود أو من تحميل Windows Service Pack 2
الرجاء المساعدة
هذا الكود في الفورم
On Error Resume Next Set sto = New ADODB.Recordset sto.Open "select * from arthbre order by [regions]", cn, adOpenDynamic, adLockOptimistic, adCmdText Text1.Text = sto![locname] Text2.Text = sto![locno] Text3.Text = sto![mapno] Combo1.Text = sto![aklem] Combo2.Text = sto![district] Combo3.Text = sto![regions] Text4.Text = sto![lwest] Text5.Text = sto![least] Text6.Text = sto![lnorth] Text22.Text = sto![lsouth] Text8.Text = sto![dwest] Text9.Text = sto![deast] Text10.Text = sto![dnorth] Text11.Text = sto![dsouth]
وهذا الكود في Command الخاص بالتعديل
On Error Resume Next sto![locname] = Text1.Text sto![locno] = Text2.Text sto![mapno] = Text3.Text sto![aklem] = Combo1.Text sto![district] = Combo2.Text sto![regions] = Combo3.Text sto![lwest] = Text4.Text sto![least] = Text5.Text sto![lnorth] = Text6.Text sto![lsouth] = Text22.Text sto![dwest] = Text8.Text sto![deast] = Text9.Text sto![dnorth] = Text10.Text sto![dsouth] = Text11.Text sto.Update
وهذا هو المسج
Run-Time Error '3251' لا تعتمد مجموعة السجلات الحالية عمليات التحديث . قد يكون هذا تقييدا من جانب الموفر أو من جانب نوع التامين المحدد
وفي حال قمت بالغاء ORDER BY من الفورم يعمل بشكل ممتاز ولكن عملية غير منطقية فيوجد الاف السجلات في الجدول
هل سوف يقوم بالنقر على التالي حتي يصل للسجل المطلوب
نفس المشكلة اواجهها عند البحث في التعديل
where [locno] = '" & text1.text & "'
اسف للاطاله عليكم
حاولت استخد الاسوب الاخر للتحديث ما الخطا في هذا الكود
comm.Execute = "UPDATE arthbre " _ " SET locname = '" & Text1.Text & "', locno = '" & Text2.Text & "',mapno = '" & Text3.Text & "'" _ " ,aklem = '" & Combo1.Text & "',district = '" & Combo2.Text & "',regions = '" & Combo3.Text & "'" _ " ,lwest = '" & Text4.Text & "',least = '" & Text5.Text & "',lnorth = '" & Text6.Text & "'" _ " , lsouth = '" & Text22.Text & "',dwest = '" & Text8.Text & "',deast = '" & Text9.Text & "'" _ " ,dnorth = '" & Text10.Text & "', dsouth = '" & Text11.Text & "'"
ويعطيني هذا المسج
Compile error
Expected end of stsement
والله الموفق