Solved

paradox 7 table field limit?

Posted on 2010-11-24
11
761 Views
Last Modified: 2012-05-10
I have a program that builds a temporary paradox 7 table and I am getting a field count error.  The previous programmer had the error set to fire if the field count was greater than 127.  Right now I am at 183 with my new fields.  Is there a set limit for the amount of fields for a paradox 7 table?
0
Comment
Question by:farminsure
  • 4
  • 4
  • 2
  • +1
11 Comments
 
LVL 13

Expert Comment

by:rfwoolf
ID: 34207479
Not sure - but I'll do the typical moan about Paradox which let's face it, if I don't do it somebody else will...
Paradox is depricated. It's an old database that's full of issues and you should move away from it if at all possible.
You could use a TClientDataSet and store your table in a MyBase (XML format)
There is also AbsoluteDB which can help you replace the BDE.
0
 

Author Comment

by:farminsure
ID: 34207704
preaching to the choir..and we are, but right now I need something done in a few days and this isn't helping.  Not sure if a dataset will work for me actually..
0
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 34207759
Pretty sure it is 255
http://www.delphifaq.com/faq/delphi/database/f13.shtml

It is also a BDE limitation, which should match
http://www.delphigroups.info/1/12/23687.html
0
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 34207788
Even Paradox 4 supports 255 fields.
A good breakdown of Paradox and limitations (v4-7)

http://www.prestwoodboards.com/ASPSuite/kb/document_view.asp?qid=100060
0
 

Author Comment

by:farminsure
ID: 34207821
ok..Cyberkiwi..255 is in my code actually..here is the block of code that fires an edit...it was telling me my field is 183, over the 127..and then I build a TwwQBE

On the open of that twwqbe at the very end is when I get an error message about my field counts being out of wack.  I am not familiar with the qbe, do I need to add these new fields somewhere?  I have added fields in the past and never had this issue until now, but that is because I went over this preset 127..any ideas or thoughts is appreciated.


if (WorkFileFields.Lines.Count > 127) then

       

          begin

            MessageDlg('There are more than 255 fields (more than 127 selections) in the result set.'+#13+

           

             'This will cause an error.'+#13+

             'FieldCount is currently '+Inttostr(WorkFileFields.Lines.Count),

             mtWarning,[mbok],0);

            MessageDlg(WorkFileFields.Lines.Text,mtWarning,[mbok],0);

            WorkFileFields.Lines.SaveToFile('c:\x.txt');

          end;



  wwQBE1.QBE.Clear;



        wwQBE1.QBE.Add('Query');

        wwQBE1.QBE.Add('ANSWER: C:\TCWTMP\SBSPRO.DB');

        wwQBE1.QBE.Add(''); //REQUIRED



        QL := WorkTableName+' | ';

        for i := 0 to WorkFileFields.Lines.Count - 1 do

          begin

            QL := QL + QStrip('*',WorkFileFields.Lines[i]) + ' |';

          end;

        wwQBE1.QBE.Add(QL);



        QL := '| ';

        for i := 0 to WorkFileFields.Lines.Count - 1 do

          begin

            if Pos('*',WorkFileFields.Lines[i]) > 0 then

              CheckOrLink :=

                 'CheckPlus _'+Trim(Copy(WorkFileFields.Lines[i],1,Length(WorkFileFields.Lines[i])-1))+'!'

                 else

              CheckOrLink := 'CheckPlus';

            QL := QL + CheckOrLink + ' |';

          end;

        wwQBE1.QBE.Add(QL);



        wwQBE1.QBE.Add(''); //REQUIRED



        QL := OrigTableName+' | ';

        for i := 0 to WorkFileFields.Lines.Count - 1 do

          begin

            QL := QL + QStrip('*',WorkFileFields.Lines[i]) + ' |';

          end;

        wwQBE1.QBE.Add(QL);



        QL := '| ';

        for i := 0 to WorkFileFields.Lines.Count - 1 do

          begin



            if Pos('*',WorkFileFields.Lines[i]) > 0 then

              CheckOrLink :=

                 'CheckPlus _'+Trim(Copy(WorkFileFields.Lines[i],1,Length(WorkFileFields.Lines[i])-1))+'!'

                 else

              CheckOrLink := 'CheckPlus';



              //showmessage(

              //   UpperCase(Trim(qStrip('*',WorkFileFields.Lines[i])))

              //   );



            if UpperCase(Trim(qStrip('*',WorkFileFields.Lines[i]))) = 'POLICYNO' then

                CheckOrLink := CheckOrLink + ', '+ PolicyNoL.Caption else

            if UpperCase(Trim(qStrip('*',WorkFileFields.Lines[i]))) = 'MOD' then

                CheckOrLink := CheckOrLink + ', '+ ModL.Caption;



            QL := QL + CheckOrLink+ ' |';



          end;

        wwQBE1.QBE.Add(QL);



        wwQBE1.QBE.Add(''); //REQUIRED



        wwQBE1.QBE.Add('EndQuery');





        //if g_HexNo = 'WJQ' then

        //  begin

        //    if (UpperCase(WorkTableName) = 'W_LOCNHP.DB') then

        //      begin

        //        wwQBE1.QBE.SaveToFile('c:\x.qbe');

        //        Showmessage('WJQ: QBE saved to c:\x.qbe');

        //      end;

        //  end;



        if g_HexNo = 'WJQ' then wwQBE1.QBE.SaveToFile('c:\x.qbe');

        wwQBE1.Open;

Open in new window

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.

 

Author Comment

by:farminsure
ID: 34207832
i can post the whole function if needed.
0
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 34207873
I think it is either an Infopower QBE limitation or QBE/other code is doing something to the base table that doubles the number of fields in some temp storage.
QBE (and Paradox) of course is quite dated so I don't have it around to play with.  I must have last seen it in Delphi 5.

It may be easier just to comment out or up the limit frm 127 to 255, which will reveal what it is actually intended to protect/prevent.
0
 

Author Comment

by:farminsure
ID: 34207933
Cyberkiwi, I actually bumped it up to 183 so it would skip that message but I get this these?? screenshot

and I am not sure why it is erroring on the table in the last message.
delphierror.doc
0
 
LVL 58

Accepted Solution

by:
cyberkiwi earned 500 total points
ID: 34207969
The fact that it mentions 255/127

'There are more than 255 fields (more than 127 selections) in the result set.'

and the text of the error "could not calculate side-by-side"

seems to indicate that it is doing something to each base field by creating one for each, in a temp table.  127x2=254, so once you breach 127, that temp calculation breaks.  While your table 183 is fine, using it in QBE or downstream in your program is not.

Without refactoring/reengineering some part of it, I can't think of any quick fix.
0
 
LVL 25

Expert Comment

by:epasquier
ID: 34208140
Number of fields per table : 255
here are all the limits for paradox

http://www.delphigroups.info/1/12/23687.html
0
 
LVL 25

Expert Comment

by:epasquier
ID: 34208153
ouh, ok cyberwiki has been doing his homework ;o)
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

Suggested Solutions

Title # Comments Views Activity
System restore point 4 91
calling procedure inside activexForm from secondform 1 232
Newbie Thread Programming 1 139
Downloading email attachments 2 67
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 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

20 Experts available now in Live!

Get 1:1 Help Now