0% found this document useful (0 votes)
119 views27 pages

PDox Survival Guide

- Paradox tables offer a fast and easy to use relational database format natively supported in C++Builder and Delphi. They allow for both single-user and basic multi-user applications without a separate client-server architecture. - While fast, Paradox tables are not suited for applications requiring robust client-server capabilities or supporting a large number of simultaneous users. They also have a reputation for data corruption issues. - Paradox table structure and capabilities have evolved over multiple versions, with newer versions adding additional data types and features not supported in older tables. Application compatibility can be impacted by table version/level.

Uploaded by

unja2010
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
119 views27 pages

PDox Survival Guide

- Paradox tables offer a fast and easy to use relational database format natively supported in C++Builder and Delphi. They allow for both single-user and basic multi-user applications without a separate client-server architecture. - While fast, Paradox tables are not suited for applications requiring robust client-server capabilities or supporting a large number of simultaneous users. They also have a reputation for data corruption issues. - Paradox table structure and capabilities have evolved over multiple versions, with newer versions adding additional data types and features not supported in older tables. Application compatibility can be impacted by table version/level.

Uploaded by

unja2010
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 27

A Paradox Table Survival Guide for C+ +Builder and Delphi Developers

Introduction
Professional and Enterprise versions of C++Builder and Delphi come with the ability to create, modify and manipulate Paradox, Xbase (DBase and !"C## database tables$ %he purpose of this paper is to discuss Paradox tables and provide the information necessary to create robust applications usin& this table format$ %he information here &oes into as much detail as possible$ %he &oal is to provide the reader with all the information needed to understand why thin&s are the way they are with Paradox tables$ #n some cases its more information than you probably want or need$ 'hat(s written here is the result of a number of years of personal experience with Paradox tables, the experiences and observations of customers of our Paradox %able )epair Component "et (see www$o*a$com+tu$htm , and various articles from ma&a,ines, the Borland and Corel websites$ !t the end of this paper you will find an extensive biblio&raphy of the sources$

Key Points
-ere are some .ey points to .eep in mind$

What are Paradox Tables?


Paradox tables offer a fast, easy to use relational database with native support in BDE$ !pplications that use Paradox tables can run either standalone on a sin&le system or on a networ. as a multi/user application$

Paradox is Not Client/Server


Paradox (li.e DBase is not a client server database system$ %his means, there is no separation of the server application from the client application$ #t is all one$ %hat is to say, an application that uses Paradox tables is both client and server at one time$ Believe it or not, in the olden days, this was the norm$ Do not ta.e this to mean that Paradox will not run over it networ., in fact, Paradox table applications wor. fine over a networ. as lon& as some rules (discussed later are followed$

Paradox !s "ast
Because the Paradox scheme is not client+server record access and manipulation is extremely fast$ #n cases where the application and the tables are on the same system performance is &enerally orders of ma&nitude faster than the client+server case$ %his can even be the case when the application is accessin& tables over a networ. but here other factors come into play, li.e networ. traffic, database si,e, the number of people sharin& the tables, and table hit fre0uency$$ #n fact, because of Paradox(s extremely rapid access it(s used internally by the 1C2 to store and mana&e all cached updates$

Why use Paradox Tables


When speed is i#portant
Paradox is a &ood bet for real time data collection and retrieval$

"or lo$al data stora%e


Paradox is ideal for applications that only re0uire local data stora&e and where the cost or overhead of Client+"erver is unnecessary$

As "ront &nd stora%e for Client Server appli$ations


Paradox tables can provide much the same functionality as %ClientData sets but with more flexibility$

"or Wor'%roup appli$ations

Paradox tables provide a &ood platform wor.&roup (peer to peer applications where the number of concurrent users is expected to be few (less than 3* $ %ables can be stored on any machine in the wor.&roup and shared by all$ %he data can then be periodically synchroni,ed with a master Client+"erver database$

!t(s lo) Cost


2ets face it$ #t comes as part of the Professional and Enterprise versions so there(s nothin& else to buy$

!t(s eas*
Paradox tables have none of the confi&uration issues associated with client+server databases$ 4ou can start desi&nin& and usin& table in the Database Des.top immediately after installin& Delphi of C++Builder$

Great for Protot*pin%


!lso, since Paradox supports many client+server features li.e "52 (limited , and transactions its ideal for prototypin& client+server applications$ %he pro&rammer can 6ust &o without worryin& about server side confi&uration issues$

Why to not use Paradox tables


!s expected, many of the reasons for usin& Paradox tables are same reason for not usin& them$

Paradox is not Client/Server


Client+"erver architecture has been adopted by the #" industry for &ood reasons mostly involvin& data inte&rity, control and security much of this is sacrificed for the speed and simplicity of the Paradox table format$

+ulti,user Paradox Appli$ations $an %et slo)


Dependin& on the application, Paradox table access response times de&rade very 0uic.ly somewhere between 7 and 38 users$

Paradox Tables $orrupt easil*4es its true, in fact, this aspect of Paradox tables is the focus of much of this paper$ )ead on$

Some History
%his section is especially important if you have le&acy Paradox !pplications$

Where Paradox Tables $o#e fro#


Before &oin& on, a little should be said on where the Paradox table comes from$ Paradox tables come from the Paradox Database !pplication ori&inally developed by !nsa "oftware way bac. in 397:$ #t was then purchased by Borland #nternational (now #nprise in 397; and then in 399< was licensed to Corel Corporation who owns exclusive mar.etin& and distribution ri&hts (ri&hts to the Paradox !pplication but not the table format $ %he Paradox Database !pplication is currently sold by Corel as part of their Corel =ffice "uite and as a stand/alone product$ >or more information about Corel(s$Paradox Database !pplication visit www$corel$com$

The Database Des'top


%he Database Des.top is essentially a severely stripped down version of the Paradox !pplication circa version ;$?$ 'hen wor.in& with Paradox files it is an extremely useful tool and you should become familiar with it$

Table .evels
%he default table type created usin& the Database Des.top and the BDE (Borland Database En&ine is a Paradox 8$? althou&h the default can be chan&ed usin& the BDE administrator to Paradox table level @, 8, : or ;$ (=n the confi&uration tab navi&ate to Drivers A Bative A P!)!D=X and chan&e the 2E1E2 field $

%he table level is important because each ma6or release of Paradox implemented improvements to table structures$ %hat is, table level determines the features you have available -ere(s what you need to .now on thisC D !ll Paradox table levels from 3$? throu&h @$: are compatible with each other$ D 2evel 8$? added the new Binary 2ar&e =b6ect, (B2=bs data type as well as new types of "econdary #ndices$ 2evel 8$? supports two types of B2=b fields (Eemo and Binary $ !ttempts to read, write or manipulate level 8 or &reater tables with applications that only read lower level tables will return an error that the table is password protected$ D Paradox :$? added several new data types includin&C 2on& #nte&er, %ime, %ime"tamp, 2o&ical, !utoincrement, BCD, and Bytes$ D Paradox ;$? added a descendin& secondary index !ny table created or modified to include any of these newer features will be automatically advanced by the BDE to the appropriate table level$ %he BDE can read, write, and create Paradox table levels that are compatible with levels 3$? throu&h Paradox ;$?$ "o, for example, the BDE (or Database Des.top can read and write a level 3$? Paradox table but if the Database des.top is used to )estructure the table so one of the indexes is descendin& then the table structure is automatically updated to 2evel ; and the table will no lon&er be accessible by level one only applications$ Bote that the BDE will not chan&e the table level when only readin& or writin& data$ %he table level is only chan&ed when a )estructure is performed on the table$

The Paradox &n%ine


Prior to #D!P# and the Borland Database En&ine (BDE the only way for C++ and %urbo Pascal pro&rammers to directly access Paradox %ables was throu&h the Paradox En&ine$ %he Paradox En&ine is the collective name of a tool .it containin& some D22s and an !P# that let C++ and Pascal use Paradox %ables$ %his tool .it was also sometimes .nown in the bi, as the FDatabase framewor.G because alon& with %urbo 1ision it was one of the few really &ood ==P libraries around$ %he Paradox En&ine product lived throu&h version @ which matched up with Paradox level 8 and was then replaced with #D!P# and the BDE$

Beware (TI-239B)
=ld applications that use the Paradox En&ine may have problems on systems &reater than 87< CPHs$ %#*@9B &ives this warnin&C %he Paradox En&ine has B=% been certified on the followin& chipsetsI 3$ #ntel Pentium (any speed *$ Cyrex @$ !ED %he Paradox en&ine relies on timin& for some operations$ %he speed of some CPHs can cause file loc. contentions in multi/user environments$ Youve been warned. !ctually, it(s really to bad, since the Paradox En&ine could have been a really nice lite replacement to the BDE for those 6ust wantin& Paradox functionality$

Table Structure and Field Types


%his section covers the field types available in Paradox tables$ Hse the Database Des.top %ools A Htilities A )estructure to explore the structure of existin& Paradox tables and to create and modify existin& tables$

Paradox "ield T*pes


Paradox tables are li.e any traditional relational database tables in that they have records (rows and these records have fields (columns $ 2i.e other database platforms Paradox has field types that are uni0ue to Paradox$ %hese map into Delphi and C++ data types as expected based on the field si,e and description$ %he valid Paradox field types follow$

Alpha Fields
!lpha >ields are up to *:: characters lon& and consist of letters, numbers, special symbols li.e J, K, L, or M and other printable !"C## characters$ %hese show up in the DB Des.top as symbol !$ !nd map to the %"trin&>ield type in the 1C2$

Nu ber Fields
=nly numbers$ Bumber fields can hold positive or ne&ative values$ %he ran&e of values possible for a number field is from /3?@?; to 3?@?7 with 3: si&nificant di&its$ Hse number fields when you plan to perform calculations on the values in the fields$ Bumber fields are best used when you want to perform calculations on the values in the field$ #t is a &ood idea to use an alpha field rather than a number field for phone numbers or ,ip codes$ #n an alpha field, you can include parentheses and hyphens$ %his is the B field type in the DB Des.top and maps to the %>loat>ield in the 1C2$

!one" Fields
%hese are only numbers with positive or ne&ative values$ But by default, money fields are formatted to display decimal places and a money symbol$ )e&ardless of the number of decimal places displayed, the BDE reco&ni,es up to six decimal places when performin& internal calculations on money fields$ %his is the N symbol in the DB Des.top and maps to the %Currency>ield in the 1C2$

#hor$ Fields
%hese are whole numbers in the ran&e /@*,;<; to @*,;<;$ "hort fields re0uire less dis. stora&e than ordinary number fields$ %he " symbol in the DB Des.top and %"mall#nt>ield in the 1C2$

%on&In$e&er Fields
! @*/bit si&ned inte&er that contain whole numbers (nonfractional with complete accuracy in the ran&e /*38;87@<87 to *38;87@<8; (plus or minus * to the @3st $ 2on& inte&er fields re0uire more space to store than short fields$ %his is symbol # in the DB Des.top and maps into the %#nte&er>ield type in the 1C2$

B'( Fields
%his is numeric data in a BCD (Binary Coded Decimal format$ Hse BCD fields when you want to perform calculations with a hi&her level of precision than that available with the use of other numeric fields$ %he BDE uses the Currency type to wor. with data from BCD fields, and limits the precision of the BCD values it can support to 8 decimal places and *? si&nificant di&its$ Calculations on BCD fields are not performed as 0uic.ly as those on other numeric fields$ %he BCD field type is provided primarily for compatibility with other database types that use BCD data$ %he BCD encodin& scheme will tal. use ? to @* bytes of data dependin& on the number of di&its$ %his is the L symbol in the DB Des.top and maps to the %BCD>ield type in the 1C2$

(a$e Fields
!ny valid date from Oanuary 3, 9999 BC to December @3, 9999 !D$ %he BDE correctly handles leap years and leap centuries and chec.s all dates for validity$ %he BDE treats all BC years as leap years$ %he D symbol in the DB Des.top and %Date>ield in the 1C2$

Ti e Fields
%imes of day, stored in milliseconds since midni&ht, and are limited to *8 hours$ %his is the % symbol in the DB Des.top and maps to the %%ime>ield type in the 1C2$

Ti e#$a pFields
Contains both the time and date values$ )ules for this field type are the same as those for date fields and time fields$ #nternally the data is stored as a Double with the date encoded in the data to the left for the decimal and the time

encoded in the data to the ri&ht of the decimal$ %he P symbol in the DB Des.top and the %Date%me>ield in the 1C2$

!e o Fields
Hse memo fields for text strin&s that are too lon& to store in an alpha field$ Eemo fields can be virtually any len&th$ Eemo fields are B2=bs and you should read the section on B2=bs that follows$ Eemo fields can contain letters, numbers, special symbols (such as J, K, L, and M , or any other printable !"C## character (except null $ 4ou can enter line brea.s, tabs and other print control characters in memo fields$ Eemo fields use the symbol E in the DB Des.top and are the %ype %Eemo>ield in the 1C2$

For a$$ed !e o Fields


Paradox formatted memo fields are also B2=b fields (see below and are li.e memo fields except the text can be formatted$ Paradox reco&ni,es text attributes (typeface, style, color and si,e and stores them with the text$ %o define a field as a formatted memo field, use the Create Paradox %able dialo& box or the )estructure Paradox %able dialo& box in DB Des.top$ >ormattedEemo fields can cause problems with the %able )epair functionality in the %H%#2@*$D22 see the information in the B2=b section below for details$ %his is field type symbol > in the DB Des.top and maps to the %Eemo>ield

)raphi* Fields
Paradox &raphic fields contain pictures$ Qraphic fields are B2=b fields (see below $ #ts possible to specify a field si,e for Qraphic fields but do not$ %he si,e should be ? so the &raphic data is not stored in the table, but in the separate EB file$ "ymbol Q in the DB Des.top and %Qraphic>ield in the 1C2$

+%, Fields
%he =2E field type is used to store different .inds of data, such as ima&es, sound, documents, and so on in the Paradox application$ %his is also a B2=b type field$ #t has no e0uivalent field type in the 1C2 and the Database Des.top does not support =2E data$ %his is the = field type in the DB Des.top and is not supported in the 1C2$

%o&i*al Fields
Paradox lo&ical fields contain values representin& true or false (yes or no $ By default, valid entries include R%rueR and R>alseR (case is not important $ "ymbol 2 in the DB Des.top and %Boolean>ield field type in the 1C2$

Au$oin*re en$ Fields


Paradox autoincrement fields contain lon& inte&er, read/only (non/editable values$ %he BDE be&ins with the number 3 and adds one number for each record in the table$ Deletin& a record does not chan&e the field values of other records$ 'hen creatin& a Paradox table in DB Des.top, you can specify the startin& number of an autoincrement field by specifyin& a minimum value for it$ Be sure to read the notes on the !utoincrement field type under the section on repairin& Paradox tables$ %his is symbol + in the DB Des.top and %!uto#nc>ield in the 1C2$

Binar" Fields
%hese are yet another type of B2=b field (see below $ =nly advanced users who need to wor. with custom data that the BDE cannot directly interpret should use binary fields$ %he BDE cannot display or interpret binary fields directly$ ! common use of a binary field is to store sound information$ Do not specify a si,e when creatin& a Binary field since they are stored in a separate file (the $EB file , not in the table ($DB file $ %his is symbol B in the DB Des.top$ %he advanced user usin& this field type would create a %Blob>ield descendent and extend the 1C2 for her specific needs$

B"$es Fields
Bytes fields should be used only by advanced users who need to wor. with data that Database Des.top cannot interpret$ ! common use of a bytes field is to store bar codes or ma&netic strips$Hnli.e binary fields, bytes fields are stored in the Paradox table (rather than in the $EB file , allowin& for faster access$ %he si,e of this field must be specified when the table is created and is limited to *:: bytes$ %his is symbol 4 in the DB Des.top$ %his maps to the %Bytes>ield in the 1C2$ #t(s up to the pro&rammer to ma.e sense of this unformatted data$

The B./b "ields


%he Eemo, >ormatted Eemo, Binary, Qraphic, and =2E fields are all considered to be what(s called Binary 2ar&e =b6ects (or B2=bs $ B2=b fields a stored outside the primary table file ($DB in the $EB file$ 'ith these fields it is possible to store a copy of a part of the data in the DB file$ %his can provide faster access if the B2=b data is small and is a &ood idea for the Eemo field type$ The si-e value "ou assi&n in $he (a$abase (es.$op re/ers $o $he a oun$ o/ $he e o (a$abase (es.$op s$ores in $he $ables ain (B /ile. %his can be from 3 to *8? characters$ (a$abase (es.$op s$ores $he whole e o ou$side $he $able (in $he .!B /ile). "o, for example, if you define the si,e in DB Des.top as 8: then the first 8: characters of the memo will be stored in the DB file while the EB file will still contain the whole memo$ Database Des.top retrieves the data from the $EB file as you scroll throu&h the records of the table$ %he amount of data a memo field contains is limited only by the dis. space available on your system (well actually, it does have a theoretical maximum limit is *QB $ >or the field types other than the Eemo type it is not considered a &ood idea to store any of the data (si,e S ? in the DB file$ %he reason is that if the table is chec.ed for corruption usin& the %able )epair !P#(s (%H%#2@*$D22 %H1erify%able method it will &enerally falsely report that the table is corrupt because it will li.ely find non/printable ascii data in the field$ Eore on the %able )epair !P# comes later in this paper$

Na#in% rule for Paradox "ields


>ollow these rules when specifyin& field names for Paradox tablesI D %he maximum len&th of a field name is *: characters$ D ! field name cannot start with a blan. space (unless it is enclosed in 0uotation mar.s , but it can contain blan. spaces$ D Each field name in a table must be uni0ue$ (4ou cannot have two identical field names$ 4ou cannot ma.e a name uni0ue by addin& a blan. space at the end of the name or by chan&in& the capitali,ation of the name$ D ! field name should not contain certain characters if you plan to use the table in a 0uery, because these characters have special si&nificance$ %hese characters are the comma (, , the pipes (A , and the exclamation point (T $ !void usin& "52 .eywords, such as "E2EC% and C=HB%$

Paradox "ile &xtensions


%he followin& lists the various file extensions of files typically found in a Paradox %able directory$ $DB Paradox table$ %his contains all of the tables data except for what is in the EB file$ $>!E Database Des.top(s listin& of related files (li.e a tableUs $%1 file $ (not used by the BDE $ Composite secondary index, numbered$

$4Qn

Paradox Table !nternals


Eost of the followin& information is 0uite unofficial$ !s a matter of policy, Borland does not discuss Paradox internals$ !ll information about internal structures is based on our experience and experimentation and from articles written by @rd parties$ %his information really isn(t very useful for practical purposes$

(B File #$ru*$ure
%he DB file is the central file of a Paradox table$ #t contains most of the data (except B2=b data which is in the EB file as well as critical header information$

DB File Header Block


%he header bloc. is the first bloc. in a DB file and contains information about the table li.e bloc. si,e, the first and last bloc., the number of records, the next autoincrement value etc$ -ere(s what we(ve discovered (or have been told about the header bloc.$ B"$e +//se$ 0se ?/3h )ecord buffer si,e Bext !uto#ncrement 1alue

89/:?h 'e don(t recommend directly manipulatin& any of these values$ %hey are here if illustration purposes only$ #mproper exits and hardware errors can cause the header to &et trashed when written (or fail to be written to dis.$

DB File Data Blocks


%he bloc.s followin& the header contain the table data$ Paradox tables are ali&ned on .ilobyte boundries (so a table with a *?87 bloc. si,e has its first databloc. starts at 7??h $ ! table with one record contains at least two bloc.s (one for the header and one for the data and will by 8 . lon& (if *?87 bloc. si,e $ Data can be &arbled for many reasons$ Even if the BDE doesn(t understand the data, it will try to display whatever it finds, displayin& &arba&e or Fhan&in&G$ Each data bloc. reserves the first 8 bytes as the data bloc. header$ %he first two bytes point to the next data bloc. and the second two bytes point to the previous data bloc.$ #f any of these bytes are corrupted you will have bloc. lin. dama&e resultin& in any one of 8 possible situations$

Bul&e V ! bloc. is inserted in only one strand of the chain$ %here are two variations, a bul&e can &o forwards or bac.wards$ '"*le V ! bloc. points to itself or a bloc. earlier in the chain$ (ead end V %he chain suddenly ends, leavin& the followin& bloc. stranded$ Invalid end V ! bloc. points completely out of the file havin& the same effect as Dead end$ %o correctly insert or delete a bloc., the BDE has to chan&e lin.s in three bloc.s$ !ny interruption in this lin. update process will corrupt the table$ %his .ind of corruption is amon& the most fre0uent due to improper exits, or hardware failures (see -ow %ables Qet Dama&ed below $

Inde1 Files (234 3nn4 Ynn4 3)n and Y)n)


Oust li.e a DB file the PX, Xnn, 4nn, XQn and 4&n index files have a header bloc. and data bloc.s$ #f the header is corrupt the BDE complains about invalid sort order or other index/related problems$ Oust li.e with DB files index file bloc.s can become &arbled resultin& in an error, &arba&e in returned records or a free,e$ 2i.e DB files index file bloc.s are connected by pretty much the same double/lin. scheme usin& the first four bytes of each bloc. and can suffer the same lin. problems$ #n addition indexes can &et Fout of dateG with the data file, li.e if the DB file is written to dis. but the computer is turned off before all of the index files are updated$

Locking Protocols
-istorically there have been two different Paradox loc.in& protocolsI the protocol introduced with Paradox *$? and the protocol introduced with Paradox 8$?$ %hese two protocols are not compatible$ %he loc.in& protocol has no bearin& on which type of table a pro&ram can wor. with$ %hat is, the loc.in& protocol is not tied to the table structure in any way$ "o, we will only focus on the 8$? loc.in& protocol since it(s the one the BDE uses$ %his section and the followin& section Paradox on the Betwro. contain purposeful repetition in the hope of ma.in& the concepts clearer$

Dire$tor* .o$'s
%he BDE places a loc.in& file, PD=XH")"$2CW, in each directory where tables are accessed$ %his loc.in& file re&ulates concurrent access to files in the directory$ %he loc. file references PD=XH")"$BE%, so every user must map to the data directory the same way$ #t also places an exclusive P!)!D=X$2CW file in the directory as well$ #t does this to prevent versions of Paradox or the Paradox En&ine usin& the older loc.in& system from inadvertently accessin& tables$

Wor'in%/Shareable Dire$tories
'hen the BDE needs to access Paradox tables in a directory, it places both a R"hareableR PD=XH")"$2CW file and an RExclusiveR P!)!D=X$2CW file in that directory$ %his desi&nation means that other BDE users can access tables in that directory$ %he exclusive P!)!D=X$2CW file is placed in this directory to .eep the older, incompatible loc.in& protocol from puttin& data at ris.$ #n Paradox spea., this is .nown as a R'or.in&R directory$ #n the 1C2 the wor.in& directory is specified in the %Database$Directory property$

Private/&x$lusive Dire$tories
%he BDE also needs a directory to store temporary files, such as the !nswer table from a 0uery$ 'hen the BDE starts, it also places both an RExclusiveR PD=XH")"$2CW file and an RExclusiveR P!)!D=X$2CW files in a directory, desi&natin& that directory as the location for temporary files$ %his desi&nation means that other BDE users+applications cannot access tables in that directory$ %his is .nown as a RPrivateR directory$ #n the 1C2 the private directory can be specified by settin& the %"ession$PrivateDir property$

Table .o$'s
%he BDE places each table loc. in the directory loc.in& file (PD=XH")"$2CW $ %he older loc.in& protocol used separated table loc. files$ >or example, if three users are viewin& the CH"%=EE)$DB table and one user is restructurin& the =)DE)"$DB table, the PD=XH")"$2CW file will have a shareable loc. listed for each of those three users who are viewin& the CH"%=EE)$DB table, and an exclusive loc. on =)DE)"$DB for the user who is restructurin& that table$

Con$urren$*
#n a multi/user environment, the Paradox 8$? loc.in& protocol maintains concurrency (the simultaneous use of applications throu&h the PD=XH")"$BE% file$ !ll users who want to share Paradox tables must map to the same PD=XH")"$BE% file in the same way usin& the same path, but not necessarily the same drive letter$ %he BDE places a PD=XH")"$2CW and an exclusive P!)!D=X$2CW file in each directory where tables are bein& accessed preventin& applications usin& the older loc.in& protocol from accessin& files in the same directory$ Each user who wants to share tables in that directory must map that directory the same way usin& the same drive letter and path$ Paradox then places all of the loc.in& information for that table in the PD=XH")"$2CW file, reducin& the number of files needed$

Net)or' Control "ile


%he Paradox networ. control file, PD=XH")"$BE%, serves as the reference point for all loc. files created by Paradox$ %he net file contains the users currently usin& the BDE and which table theyUre accessin&$ Each loc. file references the networ. control file and contains information re&ardin& the loc.s on the table and by which user, so each user must map to the same networ. control file in the same way, but not necessarily with the same drive letter$ >or example, if you are usin& volume D!%! on server "E)1E)X3 and the networ. control file is in the directory YPD=XD!%! each user must map YY"E)1E)X3YD!%!IYPD=XD!%! the same way, however, each user should, but is not re0uired to use the same drive letter$ #f the networ. you are usin& does not have volumes, then D!%! would be a directory off the root of "E)1E)X3$ #f you are mappin& YY"E)1E)X3YD!%! to the root of drive PI then each Paradox system would specify the location of P!)!D=X$BE% as PIYPD=XD!%!Y$ -owever, other users could map YY"E)1E)X3YD!%! to the root of drive =I and specify =IYPD=XD!%!Y as the location of the networ. control file$

Confi%urin% 01 bit Database &n%ine / !DAP! C"G


((elphi 5 onl" %he Database En&ine confi&uration file holds the networ. specific information and the list of database aliases, as well as other information$ 4ou can confi&ure #D!P# usin& the Database En&ine confi&uration pro&ram, BDEC>Q$EXE, to set the location of the networ. control file$ !lso add, delete, modify database aliases includin& which driver or type of alias used and whether #D!P# will share local tables with other pro&rams usin& the Paradox 8$? loc.in& protocol as well as some other specifics re&ardin& the tables and how data is displayed$

%o*al #e$$in&s 56 bi$


%he '#B$#B# file holds the locations of the #D!P#$C>Q file, the R'or.in&R directory, and the RPrivateR directory$ 4ou can use any text editor to chan&e these desi&nations in the '#B$#B# file$ %he location of the #D!P#$C>Q file is C=B>#Q>#2EM or C=B>#Q>#2E?3M in the Z#D!P#[ &roup$ %he locations of the Database Des.top R'or.in&R and RPrivateR directories are in the ZDBD[ &roup as '=)WD#)M, and P)#1D#)M$

Confi%urin% 23 bit Database &n%ine / !DAP!23 C"G


((elphi 27 and '77Builder) Dependin& on the version of C++Builder or Delphi use either the BDE Confi&uration, BDEC>Q@*$EXE, or the BDE !dministrator BDE!DE#B$EXE, to confi&ure #D!P#@*$C>Q$ =ptionally you can store the information in the re&istry or in both the re&istry and #D!P#@*$C>Q$

%o*al #e$$in&s 32 bi$


%he re&istry holds the locations of the #D!P#@*$C>Q, the R'or.in&R, and RPrivateR directories$ %he location of #D!P#@*$C>Q file is stored in -WE4X2=C!2XE!C-#BEY"oftwareYBorlandYDatabase En&ine value C=B>#Q>#2E?3 %he location of the BDE(s$ default R'or.in&R directory is stored in -WE4XCH))EB%XH"E)Y"oftwareYBorlandYDBDY;$?YConfi&urationY'or.Dir %he location of the BDE(s$ default RPrivateG directory is stored in R-WE4XCH))EB%XH"E)Y"oftwareYBorlandYDBDY;$?YConfi&urationYPrivDir

"inall*4 5o) the Paradox Table is A$$essed


%he BDE will first try to access the PD=XH")"$BE% file$ #f a PD=XH")"$BE% file is not found, the BDE will create a new PD=XH")"$BE% file and continue with the startup procedure$ #f the PD=XH")"$BE% file is found but the owner of this net file used a different path, i$e$ mapped to the server differently, an exception of REultiple net files in useR will be raised and the BDE will shutdown$ !fter the net is successfully opened an exclusive loc., P!)!D=X$2CW, is placed in the temporary, private, directory$ #f it fails to place the loc. the BDE will shut down$ %his can fail if some other user has an exclusive loc. in this directory or the loc. files are usin& different net files$ !fter it secures a directory for private use it will place a shareable P!)!D=X$2CW in the wor.in& directory$ Ini$iali-a$ion 'o ple$eT

The 6C. a$$ess


4ou can also specify the Betwor., 'or.in&, and Private directories in code from the 1C2$ "pecifically the %"ession properties Bet>ileDir and PrivateDir specify the networ. and private directories and the %Database property Directory specifies the wor.in& directory$

Paradox on the network


%he most common problems with applications that use Paradox tables arise from improper networ. setup$ %his section deals with proper networ. setup$ Bote that the redundancy in this section over the previous is intentional to help ma.e thin&s clear$

The N&T file revisited


'hen usin& Paradox type tables with the BDE, a Paradox net file is used to .eep trac. of the number of users$ Each user is &iven one count$ "o, for example, if three Paradox application and three BDE users use the same Paradox net file, the user count would be six (one for each Paradox user, and one for each BDE user $ %he net file also re&ulates access to tables$ %able access is enforced throu&h the use of loc. files, which (as mentioned above are written out to the directories containin& Paradox tables$ ! loc. file points to a particular net file, which has exclusive control over the table$ %his means that any user wantin& access to the table must use the net file that controls the table$ %he messa&e REultiple Paradox net file foundR (Error ?x*C?< or 33*;?I DB#E))XBE%EH2%#P2E indicates that these rules have not been followed$ #f you are certain that all current users have the same net path, this messa&e usually indicates that an old loc. file exists that points to a different net file$ =ld loc. files can be deleted if care is ta.en to ensure that no one is currently usin& them$ Deletin& active loc. files can produce unpredictable results and could cause loss of data$

Peer,To,Net)or's vs dedi$ated "ile Servers


! Peer/%o/Peer networ. is a networ. where each machine acts as both a client and as a server$ %he most common are 'indows 9:+97, and 'indows B% althou&h some people are still usin& 2antastic and Betware 2ite$ !pplications that use Paradox %ables over a networ. are usually peer/to/peer$ #f the Paradox %ables are located on a Bovell Betware file server then this is not considered a peer/to/peer networ. but a >ile "erver Betwor.$ Bote that a 'indows B% "erver with Paradox >iles is still considered Peer/%o/Peer networ. because the B% "erver can still be used as a wor.station$ %he BDE automatically detects when tables reside on a networ. drive, but it cannot detect whether the tables are on a dedicated server or a server(s client$ Dedicated servers notify client applications that a file has been modified or loc.ed$ %his functionality is not present in Peer/%o/Peer (non/dedicated networ.s$ %o achieve this functionality with Peer/%o/Peer networ.s set R2=C!2 "-!)ER to %)HE in the BDE Confi&uration Htility on the "ystem pa&e or in the BDE !dministrator(s Confi&uration %ab, "ystem A #B#%$ Bode$ %his must be done on all BDE clients that access the tables on a peer/to/peer networ.$ %his is not necessary when the Paradox %ables are on a Bovell dedicated >ile "erver$ !s mentioned above, Paradox tables also re0uire a directory used for networ. control$ %his directory must also reside on the networ. for all client applications to use$ #t is &ood practice to have a separate directories for the

application, networ., and tables$ >or our example we have a computer system named >ooEachine, which has a shared directory called >oo"hare with subdirectories >oo%ables, >ooExe and >ooBetwor. >ooEachine ("hared Directory >oo"hare A A/// (%ables Directory >oo%ables A/// (EXE Directory >ooExe A/// (Betwor. Directory >ooBetwor. %here are two different BDE environments that must also be consideredI 3 Hsin& only BDE @*Bit applications$ * Hsin& BDE @*Bit applications alon& with BDE 3<Bit applications$

Setup for 23Bit /nl* Appli$ations


%he @*Bit BDE fully supports the HBC namin& convention alon& with lon& file names$ #t is recommended that the HBC convention is used for all BDE networ. connections$ HBC stands for Hniversal Bamin& Convention and is defined as the system of namin& files amon& computers on a networ. so that a file on a &iven computer will have the same path when it is accessed from any of the other computers on the networ.$ %hat is, HBC provides a machine/independent means of locatin& the file$ ! HBC name will usually include a reference to a shared folder and file name accessible over a networ. rather than specifyin& a drive letter and path$ HBC has the followin& syntaxI YY(server name Y(share name Y(path +(file name #n our example the >ooEachine would be confi&ured to share files with others on the networ.$ %hen on >ooEachine a directory would be created and then mar.ed as shared and &iven a share name of >oo"hare$ %hen as sub directories to >oo"hare the directories >oo%ables, >ooExe and >ooBetwor. would be created (and shared $ %o access our >oo%ables shared folder you could use the HBC nameI YY >ooEachineY>oo"hareY>oo%ables Bote the double slash to start$ HBC removes the need for mapped drives$ %his will allow access to the tables and networ. directory without the user bein& mapped to the drive$ -ere is a simple example of a standard BDE alias usin& HBCI !liasI EyHBC!lias %ypeI "%!BD!)D PathI YY>ooEachineY>oo"hareY>oo%ables Default DriverI Paradox %he networ. directory for the Bative Paradox Driver is setup in the same fashionI BE% D#)I YY>ooEachineY>oo"hareY>ooBetwor. Bote that the networ. directory can also be set at runtime usin& "ession$netfiledir property (which calls BDE method Dbi"etProp $ #f for some reason HBC cannot be used with the @*Bit application, follow directions for usin& BDE @*Bit and 3<Bit applications$

Setup for 01Bit and 23Bit BD& Appli$ations


"ince the 3<Bit 'indows !P# does not support HBC, neither does the 3<Bit BDE$ %o allow applications to share the paradox tables, all clients must be mapped to the same directory on the machine hostin& the tables$ #f the hostin& machine is also used as a client, all other clients must be mapped to the root of the drive containin& the tables$ Drive letters from client to client do not have to be identical$ -ere are some examples of what will and will not wor.I Client3I PathI XIY"hareDirY%ables Client*I PathI XIY"hareDirY%ables %his is =W Client3I (!lso the machine with the tables I PathI CIY"hareDirY%ables Client*I PathI XIY"hareDirY%ables %his is =W Client3I (!lso the machine with the tables I PathI CIY"hareDirY%ables Client*I PathI XIY"hareDirY%ables Client@I PathI )IY"hareDirY%ables %his is =W Client3I PathI XIY"hareDirY%ables Client*I PathI XIY%ables ('here XIY%ables is actually XIY"hareDirY%ables, but shared on the "hareDir directory %his will not wor.$ %he BDE must be able to ma.e the same entry into the Betwor. Control file$

Paradox Tables on a Net)or' Su##ar*


56 and 8 or 32Bi$ Appli*a$ions9 3 %urn R2=C!2 "-!)ER to %)HE in the BDE Confi&uration Htility for Peer/to/peer networ.s or >!2"E if the %ables are on a Bovel file server$ * Do not use the HBC namin& convention$ @ Do not use tables with lon& file names$ 8 Ea.e sure that all clients are mapped to the same directory on the server$ 32Bi$ +nl" Appli*a$ions on 2eer-$o-2eer ne$wor.s9 3 %urn R2=C!2 "-!)ER to %)HE in the BDE Confi&uration Htility for Peer/to/peer networ.s or >!2"E if the %ables are on a Bovel file server$ * Hse the HBC namin& convention to achieve a path to the networ. directory and table directory$ I/ $he above s$eps are no$ /ollowed4 users will li.el" be lo*.ed ou$ o/ $he $ables &e$$in& errors9 RDirectory is controlled by other $BE% file$R R>ileI (Path3 PD=XH")"$2CWR RDirectoryI (Path* R =)

REultiple $BE% files in use$R R>ileI (Path PD=XH")"$2CWR

How tables get damaged


%able dama&e can result from improper setup, power failures, hardware failures, software failures, or human failures$ %he followin& list is arran&ed in order of li.elihoodC

!#proper Appli$ation &xit4 Badl* )ritten pro%ra#s4 and Po)er Suppl* Proble#s4
By far the chief cause of Paradox table corruption comes from the fact that Paradox caches information in volatile memory$ #mproperly closin& files such as due to loss of power (or brown out or restartin& a wor.station or the server without closin& files first, or pro&rammatically closin& the file in an ille&al way may all cause table corruption$ Paradox tables are not desi&ned to withstand such behavior$ Hse sur&e protectors or HP"s$ Hnfortunately in many cases the real culprit here is the end/user$ %he day comes to and end and the user 6ust shuts off the machine$ %his is a trainin& issue$ Bote that most Client "erver databases are desi&ned to recover from such conditions$

!#proper Setup
"pecifically, incorrectly settin& the 2=C!2 "-!)E property$ Eost commonly this occurs in Peer/to/Peer networ.in&$ #n this case the two different database en&ines are on two CPHs, even thou&h they may be the same version$ "ee the section Paradox on a Betwor. above for more information and proper setup$ !nother condition is when two different database en&ines execute on the same CPH concurrently and access data locally$ %his would be true when any combination of followin& is used concurrentlyI !n application(s that uses the Paradox En&ine, BDE 3< bit, BDE @* bit, Paradox for D="$ #n this case each en&ine must set 2=C!2 "-!)E to %)HE$ Bote that two applications usin& the sane BDE (for exampleI Delphi : and C++ Builder : concurrently are not a problem and 2=C!2 "-!)E does not need to be set to %)HEC #n this case, all loc.in& and cached data is in a central memory pool which all BDE applications have access to$ !lso, if two different database en&ines use data remotely, 2=C!2 "-!)E must be set to %)HE$ #ts possible to write code used in your application startup to chec. the settin& of local share$ 2oo. at the Dbi=penCf&#nfo2ist BDE !P# function call in the BDE help file for more information (bde@*$hlp $

Dis' &rrors and 7A+ Proble#s


%hese are nasty because they tend to be the most difficult to trac. down$ 'e recommend that you run "can Dis. (or e0uivalent re&ularly and ma.e sure your )!E memory is properly matched to you CPH and cloc. speed$

Net)or' Proble#s
Error transmittin& data from the wor.station to the server can corrupt data$ Eost commonly, this occurs with bad networ. hardware (cable, card, hub, etc$ $ %his has been determined to be a problem even thou&h there were no other errors are detected in data transmission$ %o determine if this is the cause for your error, try eliminatin& one CPH at a time from usin& the data and see if the problem continues$

When Client is Win89 /S73 and Tables are on an NT Server


!ccordin& to Eiccrosoft (53;8@;3 , when a pro&ram (li.e the BDE uses the Qet>ile"i,e( !P# to &et the si,e of an existin& file on a Eicrosoft networ.in& server (such as a 'indows B%/based server , the Client for Eicrosoft Betwor.s may not return the correct file si,e$ 'hen the pro&ram then attempts to write additional information to the end of the file, it may overwrite existin& data instead ! Bad 1)ED#)$1XD on a 'indows 9: client accessin& the tables can corrupt data$ "everal versions (8$??$3333, 8$??$333@ and 8$??$3338 of the file 1)ED#)$1XD need to be updated$ )eports have shown that usin& the ori&inal release of (8$??$9:? and a new release (8$??$333< or later do not result in corruption

problems$ %hese bad 1XD(s will cause the errors RBlob has been modifiedR and+or R#ndex is out of date$R #f any one of the clients has a RbadR version of this device driver, the error can occur on any machine, not 6ust the machine with the bad driver$ %his error is most li.ely occurs in 3<Bit versions of the Borland Database En&ine, althou&h it still can occur in @*Bit versions$ %o fix the problem download and execute 1rdrupd$exe from support$microsoft$com+download+support+mslfiles+1rdrupd$exe$ %he followin& files are installed by 1rdrupd$exe in the Y'indowsY"ystem directoryC 1redir$vxd (ver 8$??$333<, 9+33+9;, 33I3<a, 3:<,;;@ bytes and 1netsup$vxd (ver 8$??$333*, :+@?+9;, 33I3*a, 3;,:9: bytes >or further information on the update of 1)ED#)$1XD, Please chec. the followin& Eicrosoft Developer Betwor. !rticlesI 53;8@;3 and 53<:8?@

Also on Windo)s 89 )ith Tables on NT


!dd the followin& .ey in your re&istryI -WE4X2=C!2XE!C-#BEY"ystemYCurrentControl"etY"ervicesY1xDY1redir %hen create the strin& or Binary 1alue (either one wor.s with a name of DiscardCacheon=pen and ma.e it e0ual to 3$ %his an undocumented re&istry entry obtained from Eicrosoft$ 5uestions on its functionality should be directed to Eicrosoft$

Windo)s 89 : 8; runnin% Novell soft)are


Ea.e the followin& re&istry entries >or the .ey F-WeyX2ocalXEachineY"ystemYCurrentControl"etY"ervicesY1xDYB')ED#)G set the binary value F)eadCachin&G to ?$ >or the .ey F-WeyX2ocalXEachineYBetwor.YBovellY"ystem Confi&YBetware Dos )e0uesterG set the strin& value FCache 'ritesG to Bo and the strin& value F=pportunistic 2oc.in&G to Bo$ 4ou can set these entries even if Bovell is not installed without adverse conse0uence$

/pportunisti$ lo$'in% <Windo)s NT /nl*=


%here is a problem with opportunistic loc.in& in 'indows B%$ %ry turnin& off opportunistic loc.in& in the 'indows B% re&istryI "ee Eicrosoft !rticle 53*9*?* !dditional information about possible problems introduced by opportunistic loc.in& can be found in E"DB articles 53@8<@;, 53*893<, and 53*<?*<$ BoteI Both Borland(s internal testin& and ours has not indicated this settin& to be si&nificant$ >urther, Corel tech support denies that B% opportunistic loc.in& is a problem$ -owever, some Borland customers have indicated this to solve the problem$

Tables )ith a lar%e nu#ber of !ndexes and 7eferential !nte%rit*


%estin& has shown that tables with a lar&e numbers of indexes or indexes with a lar&e number of se&ments, especially involvin& )eferential #nte&rity can cause index corruption problems$ %his seems to be especially true when 'indows B% is hostin& the %ables$ Eovin& the tables so they are hosted on a 'indows 9:+97 or Bovell Betware files servers may resolve the problem$ 'here tables must be .ept on an B% "erver Borland recommends switchin& to a Client+"erver database$

Green Devi$es
Corel recommends that you disable all &reen (ener&y/savin& hardware and software$ =ften table corruption may occur when usin& &reen monitors, &reen cards and other &reen devices$

Write,Behind Ca$hin%
>or :indows 3.5 / ensure that "E!)%D)#1E or any other cachin& pro&ram does not perform write/behind cachin&$

>or :indows /or :or.&roups 3.51 V disable dis. write cachin& in the "4"%EE$#B# in the Z@7<Enh[ section and add an entry to disable @*/bit write/cachin& on all drives that have shared data on them, e& >orce2a,y=ffMCDE$ Eicrosoft Wnowled&eBase article 53?;<8: describes this option and article 53?73?9 emphasi,es that Z@7<Enh[ is the correct section, not Zvcache[ as mentioned in the )esource Wit documentation$ #f !H%=EXEC$B!% loads the "E!)%D)1$EXE pro&ram, ma.e sure the /X parameter is used to disable write/behind cachin& >or :indows 9; and 9< V >rom the control panel select the "ystem #con, than on the Performance tab clic. the >ile "ystem button and choose %roubleshootin&$ Chec. the option to FDisable write/behind cachin& for all drivesG$

And a bit #ore esoteri$ >


!pparently one pro&rammatic way you can corrupt paradox tables is if you attempt to post a duplicate value to a uni0ue, non/primary index at the same time you attempt to open the same table$ %his problem only occurs if local share is set to >alse and only occurs on local drives$

?nverified 6oodoo
%he followin& points have been mentioned as bein& causes of table corruption but not been formally tested$

D 'indows 9: =nlyI Brin& up the networ. properties screen on all 'or.stations and enter the netBEH#
properties screen$ =n the advanced tab, ma.e sure that R"et this protocol to be the default protocolR is chec.ed$

D 'indows 9: =nlyI #f the previous su&&estion did not wor., try removin& the followin& protocols in order$
)emove one at a time and then re/test your problemI BE%B#=" support for #PX+"PX/compatible Protocol , %CP+#P , and #PX+"PX/compatible Protocol

D #f the problem disappears, attempt to add bac. in all protocols e1*ep$ for the last one that was ta.en out$
!&ain, ma.e sure netBEH#Us default protocol chec. box is chec.ed$

D 'indows B% =nly used as a 'or.stationI =n the Betwor. Bindin&s pa&e of the Betwor. Properties, set the
BetBEH# Protocol to be at the top of all services$ %he %CP+#P stac. is .nown for havin& alot of overhead that mi&ht cause timin& problems$ "ince B% will send re0uests bac. in the same protocol as it is sent, chan&in& the bindin&s on a B% machine used as a server will have no effect$

How to

inimi!e Table "amage

BAC@?P A/?7 TAB.&S 7&G?.A7.A


B!CWHP 4=H) %!B2E"T !nd do it on a re&ular scheduled basis otherwise you &et no sympathy$ 'ith &ood bac.ups, the worst that can happen is some small incremental data loss$ 4ou(ve heard this all before$ Oust do it

Train *our users


Probably the hardest$ Qet your users trained$ Ea.e sure they understand how to properly exit your application, shut down windows and turn off their machine$

Confi%ure *our &nviron#ent Corre$tl*


Ea.e sure your networ. is set up accordin& the &uidelines in the section Paradox on a Betwor.$ "pecifically, 3 $ Ea.e sure to #e$ %+'A% #=A>, $o T>0, with which ever BDE confi&uration utility you have$ * $ "et up the @ file shared directory structure discussed above$ @ $ "pecify your applications %"ession$Bet>ileDir, %"ession$PrivateDir and %Database$Directory to point to the proper directory$ 8 $ Ea.e sure your PrivateDir has enou&h dis. space available$ 5ueries lin.ed across tables can ta.e up three to four times the si,e of the lar&est table of its temporary filesT : $ Hse HBC path names$

Che$' *our 5ard)are


Ea.e sure you hardware (computers, networ. cards, dis.drives etc$ etc$ is in &ood wor.in& order$

"lush *our Buffers


>orce your data write to dis.$ !s mentioned, chan&es made to a Paradox table are normally not written to dis. until the table is closed, so power failure or system crash can result in a loss of data, and or table corruption$$ %o avoid this loss of data you can instruct the 1C2 to write chan&es to dis. usin& the FlushBu//ers method$ %he >lushBuffers method didn(t appear until Delphi and C++ Builder @$ >or earlier version a direct call to the BDE !P# method (bi#ave'han&es accomplishes the same thin&$ FlushBu//ers internally calls (bi#ave'han&es and # would normally opt for the 1C2 method$ -owever, if you want to ma.e the BDE call directly by all means do so$ 4ou should refer to the BDE help file (bde@*$hlp for the detail$ !lso, prior to BDE version 8 another function (bi0seIdleTi e was also available$ # don(t discuss DbiHse#dle%ime here because as nice as it was it(s now &one$ $ FlushBu//ers saves to dis. all the updates that are in the buffer of the table associated with the table$ #t can be called at any point$ >or example, a &ood time to call >lushBuffers is in the %able !fterPost eventI
void __fastcall TForm1::Table1AfterPost(TDataSet *DataSet) { Table1- Fl!s"#!ffers)$ %

!nother &ood place to call >lushBuffers would be in the !pplications$=n#dle event$ #n that case you would call the >lushBuffers for all modified tables in your application$

Post un,posted re$ords onClose


Dependin& on how you application is desi&ned it is often possible that there are unposted records han&in& around when a form (or the application is closed$ Hse the =nClose or =nClose5uery event to post or cancel unposted records$

Don(t ?se the D/S S?BST $o##and or the 7oot Dir


Don(t store tables on drive letters manufactured with the D=" "HB"% command$ "HB"% disables @* bit file access slowin& thin&s down and bloc.in& 1"-!)E from bein& loaded and &enerally muc.in& thin&s up$ Don(t store BE% files in a root directory, some BDE visions handle this very badly$

Win2 0 Appli$ations
#n Delphi 3, write a wmXEnd"ession messa&e handler for your main form and call -alt in it$ %his ensures the BDE closes down and hopefully flushes all its buffers$ !lso, ma.e sure "-!)E is loaded with the parameters su&&ested by Borland +>I8?9< +2I8?$

#ommon $rror

essages and #auses

B+ultiple Paradox net file foundB


The message "Multiple Paradox net file found" (Error 0x2C06 or 11270: !"E##$%ETM&'T"P'E( indi)ates improper net*or+ setup, -ee the earlier se)tion Paradox on a %et*or+

B!ndex out of DateB


#ndex out Date (N*>?* is an error that occurs while usin& Paradox tables when the data in a table and a correspondin& index is not consistent$ #n most cases, short of malicious behavior such as renamin& an index, addin& some data to the table, then renamin& the index bac., there is no pro&rammatic way to cause this error to occur ("ee the section above -ow %able Qet Dama&ed $ %here is no way to determine which index is out of date$ !ll indexes must be recreated$

BBlob has been #odifiedB


Blob has been modified (N@@?* is an error that occurs when the B2=b portion of the record contained in the $DB file has become inconsistent with the B2=b portion in the $EB file$ %his could occur when the write to the $DB file was successful but the $EB file did not &et updated, or visa/versa$ ("ee the section above -ow %able Qet Dama&ed

B.o$' file has %ro)n too lar%eB


%he error F2oc. file has &rown too lar&e, DecimalI989: -exI*:3;G is specific to Paradox tables and can be caused in any BDE (3< or @* Bit application that meet any of the followin& criteriaI 3 %he Executable is in the same directory as the table$ * %he Private Directory is not correctly set or not set at all$ @ Delphi or C++BuilderI -avin& a %%able open on a paradox table and then performin& multiple %5uery operations$ 8 2=C!2 "-!)E set to %)HE$ %o solve the problem, ma.e sure that your application has done !22 of the followin&I 3 >ollow the &uidelines indicated in the section Paradox on a Betwor. above$ Especially pay attention to the recommended @ directory structure$ >or the followin& example under the directory where the executable is, create three new directoriesI %!B2E", P)#1, and BE%$ Place all the tables for the application into the %!B2E" directory$ * "et the sessionUs private directory to the P)#1 directory$ %a.e the followin& steps (this example uses Delphi but the essence is the same for C++ Builder
Sessio&'PrivateDir :( )*tractFilePat"(ParamStr(+)) , -P./0-$

@ "et the sessionUs networ. directory to the BE% directory$ %a.e the followin& steps accordin& to the software you are usin&$
Sessio&'1etFileDir :( )*tractFilePat"(ParamStr(+)) , -1)T-$

8 #f 2=C!2 "-!)E is set to true and you are not sharin& tables between different applications at the same time, chan&e 2=C!2 "-!)E to false$ %his should correct the 2oc. >ile %oo 2ar&e error$

C?n'no)n !nternal /peratin% S*ste#D


%his error can occur when attemptin& to open a Paradox table whose lan&ua&e driver is not installed on your computer$ #n most circumstances this means a bad BDE install and BDE should be reinstalled$ =ne way to determine a li.ely bad install is by runnin& BDE administrator and attemptin& to modify the lan&ua&e driver for the Paradox driver$ #f only one lan&ua&e driver is available, it indicates a bad install$ %his problem is most li.ely to occur with BDE :$? when deployin& with a deployment tool that does not .now about BDE :$?$ %he problem occurs because BDE :$? includes a new mechanism for lan&ua&e drivers$ %o deploy BDE :$? lan&ua&e driver features with an older development tool be sure include B!B%!E$D22 and \$B%2 from the BDE directory on your deployment machine$

CSharin% 6iolationD
%his error is most commonly caused by a R2oc. >ile ContentionR$ ! loc. file contention occurs when user R!R, is accessin& one or more Paradox tables in a directory$ R!R is closin& the last table in the directory$ %he BDE detects that R!R is the last pro&ram accessin& the tables in the directory$ "ince R!R is the last user on the tables, the $2CW files are &oin& to be deleted$ !t this time, user RBR attempts to open a table in the same directory$ RBR opens the $2CW files to write an entry to it$ %his is when R!R tries to delete the $2CW files that RBR has 6ust now opened$ %his will cause a sharin& violation on the $2CW files$ %he share violation usually occurs on the last client to close the table$

%here are a few of solutions to this situation$ "olution 3 %he first solution is to override 'indows error routines and i&nore the error$ #n all test cases, then a sharin& violation occurs, the table is still opened or closed$ %o accomplish this, use the 'indows !P# "etErrorEode passin& the "EEX>!#2C)#%#C!2E))=)" constant$ 4ou would only need to do this before openin& and closin& a table and then chec. to see if the table has actually been open$

"olution * %he second solution is to .eep the 2CW files in the tableUs directories$ #f the BDE detects that more than one !pplication (or "ession is usin& the tables, it will not attempt to delete the $2CW files therefore solvin& the problem$ !ccomplish this by creatin& a RDummyR Paradox table in each table directory that the application uses$ ExampleI executable is in directory CIYEyPro&$ %his executable opens tables in two different directories / CIYEy%ables and DIY%emp%bl$ Create a RDummyR table with the Database Des.top, or any other Paradox table creation utility, in both the CIYEy%ables and DIY%emp%bl directories$ =nce the tables are created, create an application that opens each of the RDummyR pro&rams at startup$ 2eave this pro&ram runnin& at all times$ =ptimally, this executable is placed on a server machine, li.e 'indows B%, so whenever other applications are accessin& the data, the server also has the RDummyR tables open$ "olution @ 2eave at least one table durin& the entire applicationUs run$ =pen one table durin& application startup don(t close it until exit$ "olution 8 Hse the Dbi!c0Persist%able2oc. BDE !P# function to create a loc. on a table that does not exist$ "ee bde@*$hlp for details$ Be aware that each instance of the application must have a uni0ue, non/existent table name or an attempt to place a loc. in the directory will fail$ #f this method is used, an al&orithm must be used to &uarantee a uni0ue table names$ #f a user can only run one instance of the pro&ram at a time, the networ. user name can be used as a table name$ Addi$ion no$es %he sort of F2oc. >ile ContentionG problem does not seem to occur on B% wor.station machines$ %he application can be either 3< or @* bit$ "etErrorEode seems to wor. with both cases$ %he problem is more li.ely to occur if the networ. protocol is netBEH#$ #f possible use netB#=" or #PX+"PX$ Constant closin& and openin& of tables will cause this error more often$ %he error most commonly occurs on the close of the table, not the open$ #n this situation the closin& application tries to delete files that another application now has open$

CDupli$ate value in uniEue 'e*D


#f this table has an autoincrement field type then the li.ely cause is a bad auto increment seed in the table header$ "ee the section titled Bro.en Au$o In*re en$ /ield later in this document$

Fixing #orrupt Tables


T)o Goals
'hen facin& corrupt paradox tables you should always have two &oals$ Firs$, try to determine the cause of the dama&e and eliminate it$ #e*ond, recover and repair the data$

7epair steps
%here are several steps involved in repairin& table corruption$ 3$ >eboo$ >irst try rebootin& your system(s and ma.e sure the corruption messa&e is real$ #t turns out that some corruption messa&es may be 6ust a misunderstandin& between volatile memory, dis. memory and the BDE$ #f after rebootin& the error is still manifest then ] &o on$ *$ 2repara$ion Before you be&in with repair utilities, you should always ma.e a bac.up of all files (corrupt or not $ #ts possible the repair utility could ma.e thin&s worse so ma.e sure you .eep an earliest version of the corrupt files around$ %his is especially important if you have to resort to step <$ 4ou will also need to have exclusive access to the files$ #f possible copy them to a local hard drive and disconnect from the networ.$ #f this is not possible, ma.e sure that no one else has access to the tables while you are wor.in& on then$

@$ The Table repair u$ili$" and Tu$ili$" (%%.


'hen ever Borland does a build of the BDE, one of the resultin& D22s is %H%#2@*$D22 (%H%#2#%4$D22 for the 3< bit BDE $ %his D22 is not distributed with the BDE but is available on the Borland 'ebsite at www$borland$com+devsupport+bde+utilities$html $ Borland does not officially support this D22 but they have published some documentation and sample pro&rams that can also be found at the above location$ (-istorically, the location of these files has moved 0uite often so if the lin. &oes bad 6ust surf the BDE support area, you should find it$ $ 4ou can find additional information on these D22s at our web site www$o*a$com+%H>iles$htm web site which also maintains lin.s to the current pa&e on the Borland site$ # mention that the %H%#2@*$D22 is a side effect of the BDE build process because the rule is that the BDE version and the %H%#2@*$D22 version should match$ %he reality is that the code for the %H%#2@*$D22 hasn(t been modified since BDE @$:3 so any version of the D22 &reater than @$:3 should be fine$ %he %H%#2@*$D22 is the basis for the %able )epair utility that comes with Corel(s Paradox !pplication (version 9 as of this writin& $ "o if you have a recent version of the Paradox !pplication you can use the built in table repair functionality on your Paradox tables$ #f you don(t have a version of the Paradox application you can &rab a table repair utility (that also uses the %H%#2@*$D22 from the Borland web site mentioned above$ =r] even better, you can chec. out our %%Htility component set at www$o*a$com+tu$htm$ 4es, this is a shameless plu& but if you want automated Paradox table verify and repair that can ta.e care of your whole database without human intervention then it(s the only way to &o $ %able repair based on the %H%#2@*$D22 will repair dama&e, and should usually be the first step in repairin& a corrupt table$ %he D22 is not however 3??J effective$ =ow $he (%% wor.s V %he %H%#2@*$D22 can both verify and repair Paradox tables$ %he idea is to first confirm corruption but runnin& the verify routine and then dependin& on the severity of the error select a repair method$ #f the verify routine only finds dama&e in the indexes or the data bloc.s of the DB file then the table can be rebuilt usin& its own structure$ #f verify finds that the header section of the DB file is dama&ed then what the table .nows about its own structure is 0uestionable$ #n this case a suitable structure definition will need to be provided to the repair routine$ %ypically this is done by providin& another table with the same structure as the one bein& repaired to Fborrow structureG from$ >or this reason, we always su&&est that you .eep an empty set of all your tables around in a safe place$ 'ith a valid table structure the D22(s rebuild function can be called$ )ebuild first renames the corrupt table to a bac.up name, then creates a new empty table with the ori&inal name$ Bext the D22 starts movin& the data, one record at a time, from the ori&inal table to the new table$ #f the ori&inal table had indexes and the indexes were in &ood shape then the old indexes are also renamed to the bac. up name and new ones are created from scratch$ #nformation about the structure of the primary index is stored in the DB header bloc. but nothin& about he secondary indexes is stored in the DB header so if any of the secondary indexes are missin& prior to the rebuild then they will not be available in the newly rebuilt table$ !lso if the primary index information in the header is dama&ed then its possible that now primary index is created$ #n this case you can use the DB Des.top to rebuild these indexes after the table repair has completed$

8$

#f the %H%#2@*$D22 is passed a table name and the messa&e FCannot open tableG then the dama&e is to serious for the D22 and you should continue on to step 8$$ >e ovin& inde1es Corruption can sometimes occur in the .eys, indexes or validity chec.s of a table$ %his sort of corruption is dealt with by deletin& these elements, and then recreatin& them usin& the Database Des.top(s restructure tool$ "tart up DB Des.top and select %ools A Htilities A #nfo "tructure and select the problem table$ 'rite down A%% of the structure information about indexes, validity chec.s etc$$ #f you &et an error messa&e FHnable to open tableG or FCorrupt index other than headerG, you will not be able to write down the information about the table structure$ 4ou can still continue with this sectionC however, you will need to .now what indexes and validity chec.s you have defined so that you can recreate them later$ 'rite down what fields are part of the primary .ey, the validity chec.s for each field (if any , what table loo.ups are defined, etc$ 4ou will need to recreate all of these entries in a moment$ Close DB Des.top and open 'indows Explorer and select the directory where the tables are located$ #n that directory, you(ll see a number of files with identical names, but with different extensions$ Delete any files that have the same name as the table in 0uestion, and have any of the followin& extensions PX, $X^^, $4^^, $%1, $>!E, or 1!2$ (o no$ delete the $DB or $EB filesC these contain your data and B2=b (memo fields$ =nce these files are deleted, you should be able to open and use your tables so restart DB Des.top and re/define all of you indexes, validity chec.s and referential inte&rity$ #f you still can(t open your files then &o on to step :$ )ecreate the primary .ey, validity chec.s, secondary indexes, etc$ by selectin& %ools A Htilities A )estructure, re/ enterin& the items you wrote down earlier and save$ 4our table should wor. correctly now$

:$ ,1por$ $o A#'II
%his method is the most thorou&h way of removin& corruption from a table$ %he data is completely separated from the structure of the table$ %he old table structure is discarded and re/entered$ %he data is then imported bac. into a new structure$B=%EI %his method will not wor. for Eemo, Qraphic, =2E or Binary fields$ ! discussion of the what(s needed to export a Paradox table to an !"C## file is beyond the scope of this paper$ %here are two articles on the sub6ect on the Borland web site$ %hese are %#79*D$%X%(!rticle #D 3:79* FHsin& the !"C## Driver with Comma/delimited >ilesG and also >!539<?C$%X%(!rticle #D 3<9<? FConvertin& !"C## files to Paradox %ablesG another really &ood article on the sub6ect by Dr$ Cary Oensen can be found on the Delphi Ea&a,ine web site at www$delphima&$com+features+3999+?<+di3999?<c6Xf+di3999?<c6Xf$asp $ Hsin& the same methods as above, ma.e a list of the field names, types and si,es, as well as the .eys, indices, validity chec.s, etc$ and export your table to F!"C## Delimited %extG format$ =nce you have verified that all of the records have exported correctly (open the text file in 'ordPad , you can delete the ori&inal table$ Bow create a new table with the ori&inal nane and re/import the !"C## table into the Paradox table$

<$ +ne o$her +p$ion


#f none of the above options wor., your table may is li.ely very severely dama&ed$ Corel %echnical "ervices may be able to recover some or all records in the tableC this service is available for a fee (N3:? H" per hour at the time of publication of this document $ Call 3/777/;<:/;@<9 for further information$ 'e have never used this service and are neither recommendin& or not$

Bro'en Auto !n$re#ent field


%he sin&le most commonly reported problem with tables that have been theoretically repaired successfully with the %H%#2@*$D22 is a FDuplicate value in uni0ue .eyG error when a new record is inserted into the table$ #n every case where this error has occurred after a rebuild the cause has been an !uto#ncrement field type$ %he reason for the error is that the auto increment FseedG (stored be&innin& at position 89h in the DB file header bloc. incorrectly stores a value that has already been used$ %he only solution we(ve found for this situation is to use DB Des.top to restructure the file convertin& the auto increment field to a lon& inte&er type field, save the chan&e, the restructure the table a&ain convertin& the lon& inte&er field bac. into an auto increment field$ =ut experience tells us this is a very common problem and our tests show that it is very easy to reproduce$ #n fact, we &ive it about a :?J chance of occurrin& in the situation where a table with one auto increment field is opened, a record is inserted and then the application is abnormally aborted (li.e .illin& it in the tas. mana&er $

iscellaneous F%&
! have a paradox table that uses a pass)ord 5o) do ! #a'e it so that the for# that uses the table $o#es up )ithout pro#ptin% the user for the pass)ord?
%he table componentUs !C%#1E property must be set to >!2"E (#f it is active before you have added the pasword, you will be prompted $ %hen, put this code in the handler for the formUs =nCreate eventI
Sessio&'AddPass2ord(-34 secret 5ass2ord-)$ Table1'Active :( Tr!e$

=nce you close the table, you can remove the password with )emovePassword(UEy secret passwordU , or you can remove all current passwords with )emove!llPasswords$ (BoteI %his is for Paradox tables only$

! have referential inte%rit* set on #* Paradox ho) do ! do a $as$adin% delete of #* $hild re$ords?
Paradox tables offer a )eferential #nte&rity feature$ %his feature prevents addin& records to a child table for which there is no matchin& record in the parent table$ #t will also cause the .ey field(s in the child table to be chan&ed when the correspondin& .ey field(s in the parent are chan&ed (commonly referred to as a cascadin& update $ %hese events occur automatically, re0uirin& no intervention by a Delphi or C++Builder application usin& these tables$ -owever, the Paradox )eferential #nte&rity feature will not accommodate cascadin& deletes$ %hat is, the 1C2 will not allow you to delete a record in the parent table while matchin& records exist in the child table$ %his would ma.e RorphansR of the child records, losin& referential inte&rity$ %he 1C2 raises an exception when an attempt is made to delete such a parent record$ %o effect a cascadin& delete re0uires that the deletion of the matchin& child records be deleted pro&rammatically // before the parent record is deleted$ #n a 1C2 application, this is done by interruptin& the process of deletin& the record in the parent table, deletin& the matchin& records in the child table (if there are any , and then continuin& with the deletion of the parent record$ ! record in a table is deleted by a call to the Delete method of the %%able component, which deletes the current record in the associated table$ #nterruptin& the this process to first perform some other operations is a matter creatin& a procedure associated with the BeforeDelete event of the %%able$ !ny commands in a BeforeDelete event procedure are executed before the call actually &oes out from the application to the BDE to physically remove the record from the table file$ %o handle the deletion of one or more child records, in a BeforeDelete event procedure the Delete method for the %%able representin& the child table is called in a loop$ %he loop is based on the condition of the record pointer in the table not bein& positioned at the end of the data set, as indicated by the Eof method of the %%able$ %his also accounts for there bein& no child records at all matchin& the parent record to be deletedI if there are no matchin& records, the record pointer will already be at the end of the data set, the loop condition will evaluate to >alse, and the Delete method in the loop never &ets executed$ -ere(s an example on =b6ect Pascal$
5roced!re TForm1'Table1#eforeDelete(DataSet: TDataset)$ be6i& 2it" Table7 do be6i& Disable8o&trols$ First$ 2"ile &ot )of do Delete$ )&able8o&trols$ e&d$ e&d$

#n the above example, the parent table is represented by the %%able component %able3 and the child by %able*$ %he DisableControls and EnableControls methods are used as a cosmetic measure to free,e any data/aware components that mi&ht be displayin& data from %able* while the records are bein& deleted$ %hese two methods ma.e the process visually appear smoother, but are only optional and not essential to this process$ %he Bext method need not be called within this loop$ %his is because the loop be&ins at the first record and, as each record is deleted, the record that previously followed the deleted record moves up in the data set, becomin& both the first and the current record$ %his example presumes that the parent and child tables are lin.ed with a Easter/Detail relationship, as is typical for tables for which such )eferntial #nte&rity is confi&ured$ 2in.in& the tables in this manner results in only those records in the child table that match the current record in the parent table bein& available$ !ll other records in the child table are made unavailable throu&h the Easter/Detail filterin&$ #f the tables are not so lin.ed, there are two additional considerations that must be accounted for when deletin& the child records$ %he first is that a call to the >irst method may or may not put the record pointer on a record that matches the current record in the parent table$ %his necessitates usin& a search method to manually move the record pointer to a matchin& record$ %he second consideration affects the condition for the loop$ Because records other than those matchin& the current record in the parent table will be accessible, the condition for the loop must chec. that each record is a matchin& record before attemptin& to delete it$ %his chec.in& is in addition to 0ueryin& the Eof method$ Because the records will be ordered by this .ey field (from a primary or secondary index , all of the matchin& records will be conti&uous$ %his leads to the &iven that, as soon as the first non/matchin& record is reached, it can be assumed that all matchin& records have been deleted$ %hus, the previous example would be modified toI
5roced!re TForm1'Table1#eforeDelete(DataSet: TDataset)$ be6i& 2it" Table7 do be6i& Disable8o&trols$ Fi&d9e4(:Table1'Fields:+;'AsStri&6;) 2"ile (Fields:+;'AsStri&6 ( Table1'Fields:+;'AsStri&6) a&d (&ot )of) do Delete$ )&able8o&trols$ e&d$ e&d$

#n the above, it is the first field in the parent table (%able3 upon which the )eferential #nte&rity is based, and the first field in the child table (%able* a&ainst which matchin& is 6ud&ed$

! a# atte#ptin% to add data to #* Paradox table but !F# %ettin% the &rror BTable is "ullB What is the $ause of this and ho) $an ! add #ore re$ords?
Paradox tables have a bloc. si,e which determines the maximum record si,e for a table and the tableUs maximum si,e$ By default tables have a bloc. si,e of * or 8W$ )e&ardless of the bloc. si,e, tables can have a maximum of <8W bloc.s$ %his means by default a table can &row to *:< EB$ 4ou can increase the bloc. si,e of a table in 3 of two ways$ )un BDE !dmin and chan&e the bloc. si,e for the Paradox driver to a revised number$ 2e&al bloc. si,es are 3?*8, *?87, 8?9<, 3<@78 and @*;<7$ #f your bloc. si,e is lar&er then 8?9< then you must also chan&e level to be at least :$ >inally, create a new table and batchmove your data from your old table to your new table #t is also possible to chan&e the bloc. si,e of an existin& Paradox table by callin& BDE !P# function dbiDo)estucture (see bde@*$hlp $ >or an example see www$borland$com+devsupport+bde+files+pxrest$,ip

5o) $an ! $he$' the ./CA. S5A7& settin% fro# #* $ode?


%he 2ocal "hare settin& is crucial to proper operation of Paradox tables on a networ.$ 4ou can chec. the 2=C!2"-!)E settin& in your main forms =nCreate as follows$
f!&ctio& <ocalS"are/sTr!e : #oolea&$ var

S< : TStri&6<ist$ be6i& { )&s!re #D) is i&itialised % Sessio&'=5e&$ S< :( TStri&6<ist'8reate$ Sessio&'>et8o&fi6Params(-?S4stem?/&it-@--@S<)$ res!lt :( (-T.A)- ( S<'0al!es:-<=8A< SBA.)-;)$ S<'Free$ e&d$

!nd then in the main forms =nCreateC


5roced!re TForm1'Form8reate(Se&der: T=bCect)$ be6i& if &ot <ocalS"are/sTr!e t"e& be6i& S"o23essa6e(-#D)--s <=8A< SBA.) fla6 m!st be T.A) for t"is - , -5ro6ram to r!&' T"is 5ro6ram 2ill &o2 termi&ate-)$ A55licatio&'S"o23ai&Form :( False$ A55licatio&'Termi&ate$ e&d e&d$

Bote that Delphi 3 did not support the >et8o&fi6Params menthod so you will need to call the BDE !P# method DbiQet"ysConfi& to &et the local share value$

5o) do ! pa$' a Paradox Table?


Deletin& records from Paradox table, doesnUt resi,e the fileC it simply mar.s the space of the record as available$ %hus, as you add records, over time you &et a bi&&er data file$ =nce youUve deleted some records you can Fpac.G the table$ -ere(s some code to do 6ust that$
5roced!re PacD/t(Tbl: TTable)$ var crtd: 8.TblDesc$ D# : TDatabase$ .es: D#/.es!lt$ be6i& D# :( TDatabase'8reate(A55licatio&'3ai&Form)$ D#'Database1ame :( Tbl'Database1ame$ if Tbl'Active t"e& Tbl'Active :( False$ D#'8o&&ected :( Tr!e$ Fill8"ar(crtd@SiEe=f(8.TblDesc)@+)$ StrP8o54(crtd'sETbl1ame@tbl'Table1ame)$ crtd'bPacD :( Tr!e$ .es :( DbiDo.estr!ct!re(db'Ba&dle@1@Fcrtd@&il@&il@&il@FA<S))$ D#'8o&&ected :( False$ D#'Free$ /f .es ( )..8=D)_1=1) t"e& s"o2messa6e(-PacD 8om5leteG-) else Dbi)rror(.es)$ e&d$

A$$essin% the PD/G?S7S N&T file on Novell drive ta'es H,0I se$onds )ith Windo)s 89 Client for Novell /$$urs )ith an* BD& $lient
Problem only occurs with Bovell client$ Eicrosoft is =W$ "o, the simplest solution is to switch to Betware client$ !lso, accordin& to Bovell the problem only occurs with 'indows 9: and 97$ 'indows B% are fine$ Bovell has a discussion of this problem on their web site$ #t may be found by &oin& to support$novell$com+search+.bXindex$htm, search on pdoxusrs$net, then select the document called Rslowness when launchin& Paradox on 'indows 9:R -ere is the solution this document statesI Cache writes M off Close Behind %ic.sM? >ile Cachin&M? 2oc. DelayM3 2oc. )etriesM3 )ead =nly CompatibilityM on %rue CommitM=n =pportunistic 2oc.in&Moff (with the older client

! need to distribute #* Paradox tables on a CD,7/+4 ho) do ! do that?


%he Paradox loc.in& scheme re0uires the existence of a PD=XH")"$2CW file to handle its loc.in& lo&ic$ %his file is &enerally created at run/time and resides in the same directory as the tables$ 'ith a CD/)=E there is no way to create this file at run/time since the device is read/only$ %he solution is to pre/create the PD=XH")"$2CW file and put it on the CD/)=E when it is ori&inally created$ %he followin& is a small pro&ram for creatin& a PD=XH")"$2CW file that you can copy to the CD/)=E master ima&e$
!ses #D)@File8trl 5roced!re 3aDe1)TFile(DirPat" : TFile1ame)$ var D# : TDatabase$ s : arra4:+''1++; of c"ar$ be6i& /f Director4)*ists(DirPat") t"e& be6i& D# :( TDatabase'8reate(A55licatio&'3ai&Form)$ D#'Database1ame:( -Tem5D#-$ D#'Driver1ame:( -Sta&dard-$ D#'<o6i&Prom5t:( false$ D#'8o&&ected :( False$ D#'Params'Add(-Pat"(- , DirPat")$ D#'8o&&ected :( T.A)$ 8"ecD(DbiAcHPersistTable<ocD(D#'Ba&[email protected]=X'[email protected]=X-))$ D#'8o&&ected :( False$ D#'Free$ e&d else be6i& StrP8o54(s@-Director4 : - , DirPat" , - Does 1ot )*ist-)$ A55licatio&'3essa6e#o*(s@ -)rrorG-@ 3#_/8=1ST=P)$ e&d$ e&d$

%o use this procedure specify the destination path of the 2CW file in the DirPath paramter$ =n return, both a PD=XH")"$2CW and Paradox$lc. file will be in the DirPath location$ !ll you need do is copy the resultin& PD=XH")"$2CW to the CD/)=E master ima&e$ (%he P!)!D=X$2CW file is only necessary when accessin& Paradox for D=" tables so you can delete it$

'e(erences
Borland Te$hni$al Arti$les ))) borland $o#
%#@@8* (Article ID: 15209 1iews on the Paradox corruption issue %#3:88@ (Article ID: 15443 !utoincrement value of Paradox table %#38@;D (Article ID: 16437 Paradox 2oc.in& Protocols %#99*D (Article ID: 15992 !utomatin& lo&on for Paradox tables %#*<:B (Article ID: 15265 "harin& 1iolation Error with Paradox %ables %#3@@@D (Article ID: 16333 Paradox %ables on CD/)=E >!5@;89B (Article ID: 18749 %ables lan&ua&e drive must be correct >!5@;9B (Article ID: 15379 !ccess to PD=XH")"$BE% slow %#*93@D (Article ID: 17913 Ea.in& sure chan&es survive a power failure %#7<*D (Article ID: 15862 Cascadin& Deletes w Pdox )eferential #nte&rity %#8*B (Article ID: 15042 Pac.in& Paradox table %#3*:<B (Article ID: 15256 )emovin& F2oc. file $ to $ lar&eG Error %#3:38@ (Article ID: 10318 Paradox %able full fix by chan&in& bloc. si,e %#<9B (!rticle #DI 3:?<9 Common Paradox Error Eessa&es %#*8;B (Article ID: 15247 BDE "etup for Peer to peer networ.s >!5@3@B (Article ID: 15313 Paradox >ile Extensions %#:B (Article ID: 15212 Paradox$BE% file explained %#*@9B (Article ID: 15212 %he Paradox En&ine %#*7?3C (Article ID: 17801 'ritin& a Buffer Dis.

Corel ))) $orel $o#


C%# ;:7< Possible Causes of %able Corruption C%# ;:77 Dealin& with %able Corruption C%# ;:7; Confi&urin& the #dapi (Borland Database En&ine# Eicrosoft Developer Betwor. !rticles

/ther
www$itecu.$com+Delma&+Paradox$htm )eally &ood articles on the sub6ect from a really &ood (li.ely the best Delphi ma&a,ine$$ www$turbopower$com+newsletters+?;97+default$asp / Discussion of the 'indows 9: redirector problem and B% opportunistic loc.in&I msdn$microsoft$com / 5387@<; discusses the 'in9: redirector bu& www$daccess$com+"upport+#nte&ratin&XD>XwithXBet'are$htm / Discussion of Bovell settin&s to avoid data lossI support$novell$com+search+.bXindex$htm !rticle *93;??* describes a Bovell read cachin& problemC article *9338<3 describes potential data loss issues usin& 'indows 9: a&ainst a Bet'are @$33 serverI orionweb$lotus$com+sims+c7f<X:8<$htm / ccIEail technical paper 388*9@ discussin& various 'indows re&istry settin&s that need to be set correctly to avoid data lossI orionweb$lotus$com+sims+7a;<X:8<$htmccIEail technical paper 3@9;38 discussin& preferred Bet'are settin&s to avoid data lossC if you use Bet'are you should read this as it describes many preferred Bet'are confi&uration settin&s not discussed hereI

You might also like