ADO problem with database operations on dBase III tables 
Author Message
 ADO problem with database operations on dBase III tables

I'm trying to manipulate a couple of DBFs through code. Based on one DBF, I
want to delete records from another DBF and add them to yet a third. I
realize
that Jet can't actually delete records from a dBase file, but it can mark
them deleted and that's fine with me. Here's the connection string I'm
using:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=J:\Data\;User ID=Admin;Extended
Properties=dBase III;Locale Identifier=1033;

This is the query I'm running:

DELETE FROM ABINew WHERE RECID IN (SELECT RECID FROM ABINew1)

(I had to do the subselect because Access refused to run the query when it
had an inner join, and if Access itself won't run a query....)

The first error I get it this:

-2147467259: Selected collating sequence not supported by the operating
system.

So I run the procedure again. (I threw in the Locale stuff after the first
time I saw this, hoping it would fix it. It didn't.) The previous error does
not occur (but it would if I closed the program and started it up again),
but this one does:

-2147467259: Could not delete from specified tables.

I ran the exact same query from Access (where I had these DBFs linked) and I
was able to delete from ABINew. Any suggestions? I really don't want to
create an MDB and link these files.

And yes, the files ABINew.dbf and ABINew1.dbf definitely exist in J:\Data.
I've already checked the "duh" stuff.



Sun, 06 Jul 2003 22:45:13 GMT  
 ADO problem with database operations on dBase III tables
1. The "specified collating sequence not supported" message is a known bug
that was introduced in the VB IDE by a recent service pack. This error does
not occur in compiled executables and can be ignored (or handled by "on
error resume next" during development). It's documented in:
http://support.microsoft.com/support/kb/articles/Q246/1/67.ASP?LN=EN-...
n&FR=0&qry=%26quot%3Bselected%20collating%20sequence%26quot%3B&rnk=1&src=DHC
S_MSPSS_gn_SRCH&SPR=VBB

2. "Could not delete from specified tables" is caused by the fact that you
don't have an updated Jet engine on your machine. Until the most recent
update, ODBC could not add, delete or update rows in a dBase file. There are
a couple of resolutions to this:

 > Install the Jet 4.0 Service Pack 5 upgrade, from

http://support.microsoft.com/support/kb/articles/q239/1/14.asp?Finish...
downloads%2Frelease%2Easp%3FReleaseID%3D25439%26redirect%3Dno

Quote:
> Use the Visual FoxPro ODBC driver, which is much more full-featured and

has always supported updates to dbf files.


Quote:
> I'm trying to manipulate a couple of DBFs through code. Based on one DBF,
I
> want to delete records from another DBF and add them to yet a third. I
> realize
> that Jet can't actually delete records from a dBase file, but it can mark
> them deleted and that's fine with me. Here's the connection string I'm
> using:

> Provider=Microsoft.Jet.OLEDB.4.0;Data Source=J:\Data\;User
ID=Admin;Extended
> Properties=dBase III;Locale Identifier=1033;

> This is the query I'm running:

> DELETE FROM ABINew WHERE RECID IN (SELECT RECID FROM ABINew1)

> (I had to do the subselect because Access refused to run the query when it
> had an inner join, and if Access itself won't run a query....)

> The first error I get it this:

> -2147467259: Selected collating sequence not supported by the operating
> system.

> So I run the procedure again. (I threw in the Locale stuff after the first
> time I saw this, hoping it would fix it. It didn't.) The previous error
does
> not occur (but it would if I closed the program and started it up again),
> but this one does:

> -2147467259: Could not delete from specified tables.

> I ran the exact same query from Access (where I had these DBFs linked) and
I
> was able to delete from ABINew. Any suggestions? I really don't want to
> create an MDB and link these files.

> And yes, the files ABINew.dbf and ABINew1.dbf definitely exist in J:\Data.
> I've already checked the "duh" stuff.



Mon, 07 Jul 2003 08:08:21 GMT  
 ADO problem with database operations on dBase III tables


Damn I love newsgroups. Thank you very much.

Quote:
> > Use the Visual FoxPro ODBC driver, which is much more full-featured and
> has always supported updates to dbf files.

How do I use this? Could you point me to the location of the documentation
in MSDN? Should I have this on my machine? (I have VFox 6.0.)


Mon, 07 Jul 2003 12:29:52 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ADO problem with database operations on dBase III tables

2. Attaching a dBase III table to Access 2000 via ADO

3. ADO link dBASE III table syntax

4. Converting dBase III tables -> SQL databases

5. Linking a dBase III table to an Access 2000 database - won't open

6. connecting a dBase III - Database using Ado

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

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

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

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

11. VisualBASIC dBASE III Database reading problems

12. saving Access Tables to dbase III file format

 

 
Powered by phpBB® Forum Software