
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.