Problem writing to a Dbase III table and updating the indexes 
Author Message
 Problem writing to a Dbase III table and updating the indexes

Hello.

I need to interact with a legacy application written in Dbase III and I'm
having a BIG headache with it.

I can write without problem in the .dbf table using either OLEDB or ODBC but
in neither way the indexes are updated and I have to update them cause
otherwise the application does not find my inserted rows , I tried creating
a .INF file in the same directory as the .dbf with the index that need to be
updated but until now nothing happen :(

Do I need a driver update or something? or otherwise what is the best way of
doing it, I have no problem using odbc, oledb or whatever :)
Please any advice, tips or hints will be greatly appreciated

Thanks,
Ignacio Machin.



Tue, 11 Oct 2005 20:27:20 GMT  
 Problem writing to a Dbase III table and updating the indexes

Quote:
> Do I need a driver update or something?

I can't say whether your version of MDAC is using the BDE, but if it is then
the latest version is here:
http://www.borland.com/devsupport/bde/bdeupdate.html

Quote:
>Please any advice, tips or hints will be greatly appreciated

Also, take a look at a program called BDEConfig.exe that may be installed on
your machines, it could give clues to sharing and other problems now or in
the future.

--
Mike Collier BSc(Hons) Comp Sci
www.adoanywhere.com



Tue, 11 Oct 2005 23:49:13 GMT  
 Problem writing to a Dbase III table and updating the indexes
Hi

how can I see if MDAC is using BDE? I installed BDE after MDAC and haven't
change nothing in the registry / BDE admin , I have never use BDE before

Thanks for your answers,
Ignacio


Quote:
> > Do I need a driver update or something?

> I can't say whether your version of MDAC is using the BDE, but if it is
then
> the latest version is here:
> http://www.borland.com/devsupport/bde/bdeupdate.html

> >Please any advice, tips or hints will be greatly appreciated

> Also, take a look at a program called BDEConfig.exe that may be installed
on
> your machines, it could give clues to sharing and other problems now or in
> the future.

> --
> Mike Collier BSc(Hons) Comp Sci
> www.adoanywhere.com



Fri, 14 Oct 2005 12:59:00 GMT  
 Problem writing to a Dbase III table and updating the indexes

Quote:
> how can I see if MDAC is using BDE?

You need to searech MSDN for the release notes of their providers, from what
I can remember they document the versions that rely on the BDE - but I don't
recall the details except that versions of MDAC  useing the BDE rely on the
BDE for updates but can usually read OK.

Quote:
> I have never use BDE before

There is a strong chance your legacy application is using the BDE allready
and I would attempt to find out since it may help solve any problems.

One way to check if an application is using the BDE is rename this path
C:\Program Files\Common Files\Borland Shared\BDE so that the application
fails to open any tables - then you know it is using it.

The BdeAdmi.exe application can help with your system settings, such as
LOCALSHARE:

"The ability to share access to local data between an active BDE application
and an active non-BDE application. Set to TRUE if you need to work with the
same files through both a BDE and a non-BDE application at the same time.
(It is not necessary to set LOCAL SHARE to TRUE if you do not need to have
both applications open at the same time.) Default: FALSE."

If you attach (small sample of) your Dbase file and Index here, I will open
it and see that it works on my machine.

--
Mike Collier BSc(Hons) Comp Sci
www.adoanywhere.com



Fri, 14 Oct 2005 16:58:22 GMT  
 Problem writing to a Dbase III table and updating the indexes

client site and they disable attachments.

--
Mike Collier BSc(Hons) Comp Sci
www.adoanywhere.com



Sun, 16 Oct 2005 01:04:55 GMT  
 Problem writing to a Dbase III table and updating the indexes
Ignacio, I am looking at your table, do you know how your legacy application
is connecting (ODBC Driver name and optional connection properties?).

--
Mike Collier BSc(Hons) Comp Sci
www.adoanywhere.com



Sun, 16 Oct 2005 16:54:35 GMT  
 Problem writing to a Dbase III table and updating the indexes
Hi Mike

  The legacy app is a Foxpro 2.5 application,  I'm now able to rebuild the
index from DAO , well I always could do it, but the thing is that the header
of the ndx file produced by DAO is different that the header of the original
NDX file , so the legacy application ( SBT serie 7 ) does not understand it.

  I will move forward with another solution, my application will generate a
foxpro .PRG file and later I will exec the fox interpreter with this file,
this is a compromise solution cause I have to move forward with the
development , but the original .NDX problem is still valid

Cheers,
Ignacio


Quote:
> Ignacio, I am looking at your table, do you know how your legacy
application
> is connecting (ODBC Driver name and optional connection properties?).

> --
> Mike Collier BSc(Hons) Comp Sci
> www.adoanywhere.com



Sun, 16 Oct 2005 20:23:47 GMT  
 Problem writing to a Dbase III table and updating the indexes
Quote:
> different that the header of the original
> NDX file , so the legacy application ( SBT serie 7 ) does not understand

it.

Yep, this was why I was wondering about the legacy application.

I rebuilt your index to create *.MDX instead of *.NDX and was able to get
things to work. The problem would be wether your legacy app would handle
*.MDX index files. MDX indexes are referred to as maintained Indexes and I
think are better supported across diferent applications - but not 100%
sure...

Here are my notes:
Ignacio, received your table & index..
==============================================
Files were readonly!

SQL Explorer / Database Desktop:
    Existing index *.ndx not recognised as index for table !
    Version reported as dBASEIV 2.0

Defined Unique index on SONO field {Maintained!}
Defined Index on CustNo field {Maintained!}
Saved as SOMAST01_MIKE .DBF
Index extensions *.MDX instead of *.NDX

Edited Mike Version in SQL Explorer OK, index recognised
Edited Mike Version in AdoAnywhere Browser in BDE Mode OK
Edited Mike version in AdoAnywhere Browser ADO Mode, results follow:

    1) Connection String: Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\DBase\files.zip;Extended Properties=dBase IV
    2) Server side cursor, SQL Text, ignored index values
    3) Client side cursor, SQL Text,  failed to locate record after update,
tried modifying recordset update criteria (1,2,3) Didn't work.

    4) ** Table Direct with server side & keyset cursor worked OK. **

It looks as though your existing index files are not recognised by any tools
(excpet perhaps by Dbase itself). You will have to resoilve that issue
yourself.

If you create a new index on your tables with 'Maintained' option then they
are recognised in BDE and ADO tools.

I was only able to operate on the table properly using Server Side Keyset
Cursors with Table Direct option.

==============================================

--
Mike Collier BSc(Hons) Comp Sci
www.adoanywhere.com



Sun, 16 Oct 2005 22:53:15 GMT  
 Problem writing to a Dbase III table and updating the indexes
Hi Mike

THANKS A LOT for all your help.

 I cannot change the kind of index the application use, so I'm stuck with
them :(
the weird thing is that it seems that nobody except foxpro 2.5 can
understand/handle those index files, I will do more research when I have
time.

for the moment the solution I will use is to  Let the foxpro eat its own dog
food :D I will generate a file with the SQL command and later call the
fox.exe interpreter with that file  as the argument.

Not the best solution, but I have to move forward with this.

Once again, Thanks a lot
Ignacio Machin


Quote:
> > different that the header of the original
> > NDX file , so the legacy application ( SBT serie 7 ) does not understand
> it.

> Yep, this was why I was wondering about the legacy application.

> I rebuilt your index to create *.MDX instead of *.NDX and was able to get
> things to work. The problem would be wether your legacy app would handle
> *.MDX index files. MDX indexes are referred to as maintained Indexes and I
> think are better supported across diferent applications - but not 100%
> sure...

> Here are my notes:
> Ignacio, received your table & index..
> ==============================================
> Files were readonly!

> SQL Explorer / Database Desktop:
>     Existing index *.ndx not recognised as index for table !
>     Version reported as dBASEIV 2.0

> Defined Unique index on SONO field {Maintained!}
> Defined Index on CustNo field {Maintained!}
> Saved as SOMAST01_MIKE .DBF
> Index extensions *.MDX instead of *.NDX

> Edited Mike Version in SQL Explorer OK, index recognised
> Edited Mike Version in AdoAnywhere Browser in BDE Mode OK
> Edited Mike version in AdoAnywhere Browser ADO Mode, results follow:

>     1) Connection String: Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=C:\DBase\files.zip;Extended Properties=dBase IV
>     2) Server side cursor, SQL Text, ignored index values
>     3) Client side cursor, SQL Text,  failed to locate record after
update,
> tried modifying recordset update criteria (1,2,3) Didn't work.

>     4) ** Table Direct with server side & keyset cursor worked OK. **

> It looks as though your existing index files are not recognised by any
tools
> (excpet perhaps by Dbase itself). You will have to resoilve that issue
> yourself.

> If you create a new index on your tables with 'Maintained' option then
they
> are recognised in BDE and ADO tools.

> I was only able to operate on the table properly using Server Side Keyset
> Cursors with Table Direct option.

> ==============================================

> --
> Mike Collier BSc(Hons) Comp Sci
> www.adoanywhere.com



Sun, 16 Oct 2005 23:27:59 GMT  
 Problem writing to a Dbase III table and updating the indexes

Quote:
> THANKS A LOT for all your help.

No Problem I used to work for the guy that ran the Dbase user group in the
UK. Those groups may have more help but I don't have URL's for them, google
might find some.

--
Mike Collier BSc(Hons) Comp Sci
www.adoanywhere.com



Mon, 17 Oct 2005 03:12:31 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. Problem writing to a Dbase III table and updating the indexes

2. Indexing atached dBase III tables

3. Memo field dbase III tables maximum 5000 bytes (problem VB4)

4. Memo field dbase III tables maximum 5000 bytes (problem VB4)

5. ADO problem with database operations on dBase III tables

6. ADO problem with database operations on dBase III tables

7. Using DBase III index in VB5

8. Question on dBASE III and indexes

9. VB4.0 16-bit using dBase III Indexes

10. dBASE III indexes

11. dBASE III/IV & FoxPro Index files

12. dBase III Index and VB4

 

 
Powered by phpBB® Forum Software