If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Corel Paradox > AutoInc -> Corrupt header/index...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-06-04, 03:39
posk posk is offline
Registered User
 
Join Date: Jan 2004
Location: Poland
Posts: 3
AutoInc -> Corrupt header/index...

I have found a problem in described below case:
My application inserts a record with an autoincrement ID field; if i set db to insert state on two computers, after second Post () i get message 'Corrupt header / index'. I use BCBuilder, so it's convienent to set Insert on form open (show) and Post or Cancel on OK / Cancel buttons.
I suppose, that the reason is, that dbms counts AutoInc ID value when i do 'insert'; and of course when i Post record, i get an error.
My question is: is it possible to prevent such situation?
And another question: luckily, i was able to repare db by Tutil; is it sure, that always i'll be able to repare that error?

Thank for any help

Best regards
Reply With Quote
  #2 (permalink)  
Old 01-06-04, 11:27
sundialsvcs sundialsvcs is offline
Registered User
 
Join Date: Oct 2003
Posts: 706
Re: AutoInc -> Corrupt header/index...

Quote:
Originally posted by posk
I have found a problem in described below case:
My application inserts a record with an autoincrement ID field; if i set db to insert state on two computers, after second Post () i get message 'Corrupt header / index'. I use BCBuilder, so it's convienent to set Insert on form open (show) and Post or Cancel on OK / Cancel buttons.
I suppose, that the reason is, that dbms counts AutoInc ID value when i do 'insert'; and of course when i Post record, i get an error.
My question is: is it possible to prevent such situation?
And another question: luckily, i was able to repare db by Tutil; is it sure, that always i'll be able to repare that error?
Check out ChimneySweep (see URL below)... but first, let's see why the problem might be occurring repeatedly. I think there's a configuration error on one or both computers.
  • In the BDE Configuration utility, make sure that LOCAL SHARE = TRUE.
  • Also make sure that the NET FILE DIR setting is right. It must point to a common, read/write directory separate from the database.
  • Do these changes on the server also if anyone logs on to that server and uses Paradox from there.
  • You may also need to disable "opportunistic locking" on the server... not as likely in this scenario, where the database is opened by more than one user already.

Paradox assigns the auto-increment value when you start to insert. If the values are being clobbered as you describe it's because the two computers aren't sharing the data correctly. These recommendations should help. This scenario should work flawlessly.
__________________
ChimneySweep(R): fast, automatic
table repair at a click of the
mouse! http://www.sundialservices.com
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On