VB 6.0 MS-Access 2003 - Make Sure Before You Delete

بسم الله الرحمن الرحيم
فى اى مشروع متعلق بقاعدة البيانات من نوع اكسس على وجه الخصوص أو من اى نوع على وجه العموم , يجب ان تتأكد قبل عملية حذف سجل ان :
1) السجل المراد حذفه موجود بالفعل
و يتم ذلك عن طريق البحث عن السجل فاذا كانت نتيجة البحث ايجابية : يتم الحذف اما اذا كانت سلبية فلا يتم الحذف
2) جدول قاعدة البيانات غير فارغ
و يتم ذلك عن طريق RecordCount اذا كانت = صفر بالتالى الجدول فارغ فلا يتم حذف
3) مؤشر قاعدة البيانات يقف على السجل المطلوب حذفه

و يتم ذلك عن طريق AbsolutePosition اذا كانت القيمة -1 فان هذا معناه ان الجدول فارغ والمؤشر لا يقف على أى شىء فى الجدول او ان هناك مشكلة فى محرك قاعدة البيانات اما اذا كانت القيمة -2 فان هذا معناه ان المؤشر يقف قبل بداية اول سجل فى الجدول انا اذا كانت القيمة -3 فان هذا معناه ان المؤشر يقف بعد نهاية اخر سجل بالجدول , و جميع هذه الحالات لا يتم فيها الحذف.
و ذلك حتى لا يقابل العميل الذى صممت من أجله البرنامج أى مشاكل عند اجراء عملية الحذف و ايضا حتى يكون البرنامج الذى تصممه لا وجد به اى عيوب (Bugs) .

Comments

Anonymous said…
hello!,I like your writing very so much! proportion we communicate extra approximately your article on AOL?
I need a specialist in this area to solve my problem.
May be that's you! Looking forward to see you.


Feel free to surf to my webpage DarrelVBlatchley
Anonymous said…
This is the perfect web site for anybody who would like to find out about this topic.

You know so much its almost tough to argue with you (not that I personally will need to…HaHa).
You certainly put a brand new spin on a topic that has been discussed for many years.

Wonderful stuff, just excellent!

Here is my weblog FlorindaWChowhan
Anonymous said…
This is my first time visit at here and i am truly impressed to read all
at single place.

Here is my homepage SheronWTheden
Anonymous said…
Thank you a bunch for sharing this with all people you really
understand what you are speaking about! Bookmarked. Please also visit my website =).
We may have a hyperlink trade contract between us

Look into my web site: DeePAmirault
Anonymous said…
What's up to all, how is all, I think every one is
getting more from this web page, and your views are nice in favor of new viewers.


Also visit my web-site - CodiELandres
Anonymous said…
continuously i used to read smaller posts that as well clear their
motive, and that is also happening with this post which I am reading at this time.


my blog SantanaOBulter

VB6 Popular Posts

Visual Basic Online Course - Excel 2003 Part 1

VB 6.0 - Save/Retrieve Images From Access Database

Visual Basic Online Course - ProgressBar Colors

VB 6.0 with MS-Access 2003 Copy a record from table to another

Free download Visual Basic 6 Documentation MSDN

Visual Basic Online Course - Run-time error '3021' : Either BOF or EOF is True, or the current record has been deleted.

Visual Basic Online Course - Create a Phone Book

VB6 Crystal Reports 4.6 Error : Method 'Action' of object 'CrystalCtrl' Failed

Visual Basic Online Course - Excel 2003 Part 2