![]() |
|
خطأ عند استخدام Like - نسخة قابلة للطباعة +- delphi4arab منتديات دلفي للعرب (https://delphi4arab.net/forum) +-- قسم : منتديات دلفي للعرب التعليمية (https://delphi4arab.net/forum/forumdisplay.php?fid=3) +--- قسم : سؤال و جواب حول دلفي (https://delphi4arab.net/forum/forumdisplay.php?fid=15) +--- الموضوع : خطأ عند استخدام Like (/showthread.php?tid=5398) |
خطأ عند استخدام Like - hmidadz - 15-07-2013 كود : Form2.ADOStoredProc2.Filter:='Nature like'+idn+'and NExploitation='+IntToStr(id)+'and Mois like'+idm;
علمن ان
id integer ,nexploitatiopn
nature ,idn string
idm,moi strringخطأ عند استخدام Like - lahcen - 16-07-2013 Form2.ADOStoredProc2.Filter:='Nature like'+idn+'and NExploitation='+IntToStr(id)+'and Mois like'+idm 1- عدم ترك الفرغات بين and 2- يستحسن وضع الاقواس لتفادي مثل هده الاخطا الغير متعمدة 3- ادا اكن الحقل رقمي لا تستخدم لايك او قم بتغير نوع الحقل الى حرفي 4- لا تستعمل في الفيلتر الدالة لايك اينما تستخدم في sql 5- الكود بالفلتر يكون Form2.ADOStoredProc2.Filter:='Nature ='''+idn+''' and NExploitation='+IntToStr(id)+' and Mois='''+idm+''''; 6- code sql: 'Select * From Nom_Table Where Nature Like '+QuotedStr(Idn)+' And NExploitation='+IntToStr(id)+' And Mois like '+QuotedStr(Idm) 7- يمكن اضافة % في لايك |