Board index » delphi » how to access fox table with cdx

how to access fox table with cdx

HI,everybody.
I want to open a foxpro 2.5 table with BDE.(The BDE is shiped with
delphi 3).But I always receive an error "invalid index
descript".According to the bde online help,the DBASE Driver surport
foxpro25 table with .cdx now, all you need to do are set the param LEVEL
to 25.I did this in bde administator's configuration panel,but the error
still occur.So my question are :
1)anything i did wrong to config the bde?
2)how to use bed driver to access foxpro 25 table with .cdx? I really do
not want to using odbc driver.
Thank you very much.

 

Re:how to access fox table with cdx


Quote
>I want to open a foxpro 2.5 table with BDE.(The BDE is shiped with
>delphi 3).But I always receive an error "invalid index
>descript".According to the bde online help,the DBASE Driver surport
>foxpro25 table with .cdx now, all you need to do are set the param LEVEL
>to 25.I did this in bde administator's configuration panel,but the error
>still occur.So my question are :
>1)anything i did wrong to config the bde?
>2)how to use bed driver to access foxpro 25 table with .cdx? I really do

I belive you are having a problem with a bug in the VCL that affects
setting the table level.   If you have the VCL source code (You have
the Pro or Client server versions) then the following is a note I have
on how to fix it.

.........................
However, there is currently an error in how the TTable.TableLevel
property is implemented in the DBTables unit. Development is being
made aware of this error. Support is going to try to make a
replacement file available on their Web page. If you have the VCL
source code, you can correct the error in DBTables.pas yourself. In
the procedure TTable.CreateTable, the line...

  LvlFldDesc.iLen := StrLen(Level);

...should be changed to:

  LvlFldDesc.iLen := StrLen(Level) + 1;

Add the DBTables unit to the project (not just open the file), select
Project|Build All, and the TTable.TableLevel property will function as
it was designed to.
--
Brian Bushay (TeamB)
Bbus...@DataGuidance.com

Re:how to access fox table with cdx


I think there is still a problem.
After corrected the source file, and added the DBTables unit into my
project, I still received the error "invalid index descriptor" raised
from DBTables unit.
In fact, I want to batch move some foxpro tables to a sybase server, but
I can't open
the fox tables with .cdx using native bde 4.0 driver.
I changed the driver to an odbc driver, everything is right, but it
works too slowly.
Anything else I can do? or, I did something wrong to correct the bug in
VCL?

Quote
Brian Bushay TeamB wrote:
> I belive you are having a problem with a bug in the VCL that affects
> setting the table level.   If you have the VCL source code (You have
> the Pro or Client server versions) then the following is a note I have
> on how to fix it.

> .........................
> However, there is currently an error in how the TTable.TableLevel
> property is implemented in the DBTables unit. Development is being
> made aware of this error. Support is going to try to make a
> replacement file available on their Web page. If you have the VCL
> source code, you can correct the error in DBTables.pas yourself. In
> the procedure TTable.CreateTable, the line...

>   LvlFldDesc.iLen := StrLen(Level);

> ...should be changed to:

>   LvlFldDesc.iLen := StrLen(Level) + 1;

> Add the DBTables unit to the project (not just open the file), select
> Project|Build All, and the TTable.TableLevel property will function as
> it was designed to.
> --
> Brian Bushay (TeamB)
> Bbus...@DataGuidance.com

Re:how to access fox table with cdx


Posibly you have a non-structural cdx index. Create a structural index to
the fox table.
Try update to bde 4.51 too.

Juan Antonio.
Spain.

wang xioguang escribi:

Quote
> HI,everybody.
> I want to open a foxpro 2.5 table with BDE.(The BDE is shiped with
> delphi 3).But I always receive an error "invalid index
> descript".According to the bde online help,the DBASE Driver surport
> foxpro25 table with .cdx now, all you need to do are set the param LEVEL
> to 25.I did this in bde administator's configuration panel,but the error
> still occur.So my question are :
> 1)anything i did wrong to config the bde?
> 2)how to use bed driver to access foxpro 25 table with .cdx? I really do
> not want to using odbc driver.
> Thank you very much.

Re:how to access fox table with cdx


Quote
>Anything else I can do? or, I did something wrong to correct the bug in
>VCL?

I gave you all the information I have on that error
Are you specifying the tablelevel as 25 in your code?

--
Brian Bushay (TeamB)
Bbus...@DataGuidance.com

Re:how to access fox table with cdx


Quote
Brian Bushay TeamB wrote:

> >Anything else I can do? or, I did something wrong to correct the bug in
> >VCL?

> I gave you all the information I have on that error
> Are you specifying the tablelevel as 25 in your code?

> --
> Brian Bushay (TeamB)
> Bbus...@DataGuidance.com

thanks for your help.
yes, i specified the tablelevel to 25.
but one more detail I noticed: I set a brakpoint at creatTable
procedure's entry, but this breakpoint was never trigged durring my
app runing.Instead, an except raised in the unit(DBTables), so I think
that maybe the DBTables unit was add into my project, but the
CreateTable procedure was never called in my application

Re:how to access fox table with cdx


Check the index tags on the foxpro tables.  Our experience shows that the BDE
does not support alot of the things (related to index's) that you could do in
foxpro.

for example: if one of the tags has some type of UDF in it (whether it's the
active index or not) the BDE blows up.  Also alot of the built in Foxpro
commands are not supported by the BDE such as "VAL" or "DTOC" (may be DTOS
one or the other does not work).  If you have anything like these in the
index tags you will never get the table open with the BDE.

Quote
Brian Bushay TeamB wrote:
> >I want to open a foxpro 2.5 table with BDE.(The BDE is shiped with
> >delphi 3).But I always receive an error "invalid index
> >descript".According to the bde online help,the DBASE Driver surport
> >foxpro25 table with .cdx now, all you need to do are set the param LEVEL
> >to 25.I did this in bde administator's configuration panel,but the error
> >still occur.So my question are :
> >1)anything i did wrong to config the bde?
> >2)how to use bed driver to access foxpro 25 table with .cdx? I really do

> I belive you are having a problem with a bug in the VCL that affects
> setting the table level.   If you have the VCL source code (You have
> the Pro or Client server versions) then the following is a note I have
> on how to fix it.

> .........................
> However, there is currently an error in how the TTable.TableLevel
> property is implemented in the DBTables unit. Development is being
> made aware of this error. Support is going to try to make a
> replacement file available on their Web page. If you have the VCL
> source code, you can correct the error in DBTables.pas yourself. In
> the procedure TTable.CreateTable, the line...

>   LvlFldDesc.iLen := StrLen(Level);

> ...should be changed to:

>   LvlFldDesc.iLen := StrLen(Level) + 1;

> Add the DBTables unit to the project (not just open the file), select
> Project|Build All, and the TTable.TableLevel property will function as
> it was designed to.
> --
> Brian Bushay (TeamB)
> Bbus...@DataGuidance.com

Other Threads