dBase writing to dbf file 
Author Message
 dBase writing to dbf file

hi all,

we have a (fox/Delphi) program which uses dbf file as a database.
I want to update the same dbf file from different program. I managed to
connect this dbf file using ODBC and read it without any problem. But when
it comes to update or adding new record, it gives an error saying

"[Microsoft ][ODBC dBASE driver ] The database engine could not lock table
because its already in use by another person or process."

if someone could help me with this problem. I really appreciate it.



Sun, 07 Mar 2004 23:50:11 GMT  
 dBase writing to dbf file
Hi Islem,

I am trying to read from a dBase file as well, but I am new to Visual
Basic. I was reading your post and I was wondering if you could help
by perhaps posting some of the code you have which actually opens the
dBase file and set it up to be read from.  This is what I am having
problems with.  Also, any project references that I have to install in
VB would be a great help.

If you are able to help I would appreciate it.

With regards,

Aaron

Quote:

>hi all,

>we have a (fox/Delphi) program which uses dbf file as a database.
>I want to update the same dbf file from different program. I managed to
>connect this dbf file using ODBC and read it without any problem. But when
>it comes to update or adding new record, it gives an error saying

>"[Microsoft ][ODBC dBASE driver ] The database engine could not lock table
>because its already in use by another person or process."

>if someone could help me with this problem. I really appreciate it.



Tue, 09 Mar 2004 08:10:44 GMT  
 dBase writing to dbf file
Hi aaron

this is what i use to connect. In the program references window
i have ms data objects 2.5 library, ms dao 3.6 object library,
ms data objects recordset 2.5 library, ms data binding collection vb 6.0

This is not the only way of doing it but it works for me.

Dim conn as New ADODB.Connection
Dim rs as New ADODB.Recordset

conn.Provider = "Microsoft.Jet.OLEDB.4.0;"
conn.Properties("Extended Properties").Value = "dbase 5.0;"
conn.Open DATABASEPATH

rs.Open "SELECT * FROM database.dbf;", conn, adOpenDynamic,
adLockOptimistic, adCmdText

see you


Quote:
> Hi Islem,

> I am trying to read from a dBase file as well, but I am new to Visual
> Basic. I was reading your post and I was wondering if you could help
> by perhaps posting some of the code you have which actually opens the
> dBase file and set it up to be read from.  This is what I am having
> problems with.  Also, any project references that I have to install in
> VB would be a great help.

> If you are able to help I would appreciate it.

> With regards,

> Aaron


> >hi all,

> >we have a (fox/Delphi) program which uses dbf file as a database.
> >I want to update the same dbf file from different program. I managed to
> >connect this dbf file using ODBC and read it without any problem. But
when
> >it comes to update or adding new record, it gives an error saying

> >"[Microsoft ][ODBC dBASE driver ] The database engine could not lock
table
> >because its already in use by another person or process."

> >if someone could help me with this problem. I really appreciate it.



Tue, 09 Mar 2004 15:57:14 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to read/write dBase dbf/ndx files?

2. diverting dBase IV data writes to dbf files to SQL7 tables

3. Powerbasic 3.1 sourcecode - to view dbase(*.dbf) files

4. long name dbase files (*.dbf)

5. How to delete a recordset of dBASE IV DBF file use VB4

6. Opening .DBF (dBASE) file as ODBC datasource

7. Is a DBF a dBase file or FoxPro?

8. Using .DBF DBASE III files and Deleting

9. ADO connection string for Dbase III file (*.dbf)

10. Accessing .dbf (Dbase 5) files from VB 6.0

11. How Can I access to a DBF's files of dBase from VB6

12. Connect to dBase .dbf file without ODBC ?

 

 
Powered by phpBB® Forum Software