Article View: borland.public.cppbuilder.database.multi-tier
Article #239Re: Table is full
From: Sydney Delieu
Date: Wed, 24 Nov 2004 14:02
Date: Wed, 24 Nov 2004 14:02
68 lines
3046 bytes
3046 bytes
Hi Carmen,
I have not used Paradox tables to any great extent, but I did come
across the same problem some time ago. The problem was to do with the
Paradox 'Block Size'. The Block Size of a Paradox table can be 1024,
2048, 4096, 16384, or 32768 (depending on the version of Paradox). From
memory - there is a finite number of blocks (I think it's 65536) a
Paradox table can contain, so the Block Size you set determines the
maximum size of the table (ie 65536 * BlockSize).
Here is the method I wrote to convert the blocksize - it was converted
from a Delphi example given on the Borland site. It doesn't check for
errors and is cheap and nasty (ie. does not check the Paradox table
version info to see if the requested blocksize can be used), but it did
the trick for me:
//--------------------------------------------------
// Convert blocksize given the TTable and BlkSize.
//--------------------------------------------------
void __fastcall ParadoxRestructure::ChangeBlockSize(TTable *tbl, String
BlkSize)
{
CRTblDesc TblDesc;
FLDDesc pFDesc;
hDBIDb hDB;
String Option, OptData;
Option = "BLOCK SIZE";
OptData = BlkSize;
DbiGetObjFromObj(tbl->Handle, objDATABASE, hDB);
tbl->Close();
memset((void*)&TblDesc, 0, sizeof(TblDesc));
lstrcpy(TblDesc.szTblName, tbl->TableName.c_str());
lstrcpy(TblDesc.szTblType, szPARADOX);
pFDesc.iOffset = 0;
pFDesc.iLen = strlen(OptData.c_str()) + 1;
lstrcpy(pFDesc.szName, Option.c_str());
TblDesc.iOptParams = 1;
TblDesc.pfldOptParams = &pFDesc;
TblDesc.pOptData = &OptData[1];
DbiDoRestructure(hDB, 1, &TblDesc, NULL, NULL, NULL, false);
}
Hope that this helps.
Regards,
Syd.
Carmen GοΏ½mez wrote:
> Hi all,
>
> I have a problem.
>
> When I add records in a table, I receive this message "Table is full".
> The table is Paradox and I use TQuery for filter data.
>
> What can I do?
>
> Thanks all
>
> Carmen.
>
>
Technical Details
Message-ID:
<41a49456@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsoutpeer00.lnd.ops.eu.uu.net!lnewsinpeer01.lnd.ops.eu.uu.net!emea.uu.net!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41a315f8@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: fcd2b,ea4aca6c214e2c32 X-Google-Attributes: gidfcd2b,public X-Google-Language: ENGLISH,ASCII Date: Wed, 24 Nov 2004 14:02:04 +0000 From: Sydney Delieu <sydbee@supanet.com> User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.database.multi-tier Subject: Re: Table is full References: <41a315f8@newsgroups.borland.com> In-Reply-To: <41a315f8@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 82.15.25.215 Message-ID: <41a49456@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1101304918 82.15.25.215 (24 Nov 2004 06:01:58 -0700) Lines: 68 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsoutpeer00.lnd.ops.eu.uu.net!lnewsinpeer01.lnd.ops.eu.uu.net!emea.uu.net!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail