Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 694
  • Last Modified:

problem with EmptyTable function

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
keithcsl
Asked:
keithcsl
  • 3
  • 2
  • 2
  • +4
1 Solution
 
ronit051397Commented:
Are you sure you installed all the BDE necessary files?
0
 
ronit051397Commented:
Delete your other question, you have post it twice.
0
 
ZifNabCommented:
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Oli2Commented:
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
 
keithcslAuthor Commented:
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
 
venksCommented:
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
 
MatveyCommented:
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
 
mjustinCommented:
With a TQuery component you could also issue a 'delete from Tablename' command.
0
 
keithcslAuthor Commented:
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
 
MatveyCommented:
Heyo Keith... Glad to help you again.
My best wishes for the new year!
--Matvey
0
 
keithcslAuthor Commented:
happy new year to u too Matvey!!!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
  • 2
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now