Solved

problem with EmptyTable function

Posted on 1998-11-22
11
683 Views
Last Modified: 2008-02-01
Hi

I have a function that uses the EmptyTable function to clear the contents of a paradox table. This is my problem, if i run my program in the PC that i use for development (ie with Delphi), it works just fine. However, if i install BDE and my program in another computer (without Delphi), i sometimes get an Acess Violation error or an unrecoverable exception when the EmptyTable function is executed. Can't find out why....

has anyone faced such a problem??

Regards
Keith
0
Comment
Question by:keithcsl
  • 3
  • 2
  • 2
  • +4
11 Comments
 
LVL 5

Expert Comment

by:ronit051397
ID: 1347559
Are you sure you installed all the BDE necessary files?
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1347560
Delete your other question, you have post it twice.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1347561
you are sure that you don't have some tables linked to each other and that you empty them in the correct order?
You are sure you are deploying the same BDE version as you use on your pc?
0
 
LVL 1

Expert Comment

by:Oli2
ID: 1347562
you should compare the BDE-Settings on your Develop-Computer and the Standard BDE-Settings after the installation on the other Computers. Use bdecfg32.exe to do this. Take a look onto the page "System" and compare the settings. i.E. "MaxFileHandles" often causes trouble. Hope, it'll help.
Oliver
0
 
LVL 1

Author Comment

by:keithcsl
ID: 1347563
i have checked everything and still facing the same problem. i have resorted to not using the EmptyTable, but wrote a function to delete the records one at a time.

thank you all for your help...

Keith


0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Expert Comment

by:venks
ID: 1347564
Dear keithcsl
Try keeping the table's exclusive property to true just before
calling emptytable and then set exclusive to false after the call to emptytable
venks
0
 
LVL 3

Expert Comment

by:Matvey
ID: 1347565
Yeah, Venks is right. This is a must if you want to use EmptyTable. Another option you have here is that you can also use "TTable.CreateTable" instead with the same effect. Here I think the condition is to close the table before calling it.
Anyhow, deleting all records one by one is a BAD solution. If you do this, you can notice that the record numbers remain. For example if you had 20 records before you deleted them, the next record you will append will have the number 21. If you have big tables, than it's even more destructive as you can imagine...
--Matvey
0
 

Expert Comment

by:mjustin
ID: 1347566
With a TQuery component you could also issue a 'delete from Tablename' command.
0
 
LVL 1

Author Comment

by:keithcsl
ID: 1347567
mjustin...

opps... i am sorry i have already implemented Matvey's suggestion to use CreateTable.... i should have asked Matvey to send his answer... (i forgot all about this question...)

matvey, could u please post an answer...

Keith
0
 
LVL 3

Accepted Solution

by:
Matvey earned 50 total points
ID: 1347568
Heyo Keith... Glad to help you again.
My best wishes for the new year!
--Matvey
0
 
LVL 1

Author Comment

by:keithcsl
ID: 1347569
happy new year to u too Matvey!!!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now