using tow field index with codebase

Hi,

I'm using codebase to create table and index and i use VFP 9.0 to open the table and execute querys.

when i'm creating an index for one feild :

"CREATE INDEX ind ON person(age)"

every thing works fine and there the index is working well.

when i'm creating an index for two fields or more:

"CREATE INDEX ind ON person(age,name)"

VFP cant open the table.

what seems to be the problem

thanks ishay



Answer this question

using tow field index with codebase

  • HCarter111

    If you think is .cdx file, why don't you re-create it

  • Aleksey Nagoga.

    What do you mean: "converted database in foxpro format" i'm using the "codebaseODBCStandfoxpro" driver to create the tables and indexs, so what kind of conversion did you make


  • Tech_Andrew

    I had the some problem, but with vfp 7. It seems to be a incompability database problem.In my case I converted database in foxpro format and I created a "cdx" index and it worked fine.

  • stallion_alpa

    I opened the database created with vfp 7 and I used the option export to (from file menu tab), to change format in foxbase+ (it was the only format who worked). I re-create a new cdx index file (compound index file).I did not spent to much time with this because I was in hurry and I was satisfied with that because it was working.


  • guyndjeng

    ishaywei wrote:

    I dont think code base is sending any thing to VFP i think they are creating table the are foxpro compitible.

    when you say there is no way to create index using OLEDB you mean that there is no way to create index using OLEDB at all or just that the syntax is diffrent then MSSQL

    and one last thing is it possible to create an index for two field in foxpro using VFP 9.0 or OLDDB or some other way

    Yes I think they're creating table and index lowlevel since it's easy to do so (and hopefully are aware of structure changes in VFP9).

    I didn't say there is no way, I said it is not supported. Of course you can create an index for one field or multiple fields in foxpro. Syntax is different than that of MSSQL and you can use ExecScript() with VFPOLEDB provider. I would check created CDX using an hexeditor against a CDX structure. You should especially check bytes offset 512-1023 and 12-13. Compact index file structure along with other structures are full documented on MSDN help.


  • durianpuff

    the first byte value is : 0x30


  • Norbert.Bender

    Create index ind On person(trans(age)+name) does not work, the problem isnt a syntax problem (I dont get any error code from code base when creating the index for two fields.


  • dmetz

    Can you tell the first byte value of table file Is 0x30

    Beginning with vfp8 is something changed in table header(AutotIncrement) who can affect compability with codebase.



  • Ian Newson

    Your not getting any error from codebase doesn't mean it doesn't have any error. Behind the scenes what command(s) codebase is sending to VFP "Create index" isn't available in VFP (as it does in say MSSQL). AFAIK creating an index via OLEDB driver isn't even supported (and probably also not supported from ODBC driver) so it should be doing something else.


  • RDuke

    PS. I don't know how will work with vfp 9.

  • globemast

    Would you try this (I don't use codebase to know if that'd work):

    Create index ind On person(trans(age)+name)


  • sedlin

    there is no problem with the table file ( I can open it and use it ) but only if I'm not using the .CDX file

    so the problem is probably in the cdx file


  • Raybritton

    I dont think code base is sending any thing to VFP i think they are creating table the are foxpro compitible.

    when you say there is no way to create index using OLEDB you mean that there is no way to create index using OLEDB at all or just that the syntax is diffrent then MSSQL

    and one last thing is it possible to create an index for two field in foxpro using VFP 9.0 or OLDDB or some other way


  • using tow field index with codebase