-
I have to create a program which will read and write to a dbase 4 database. I have no idea how to accomplish this...
Can anyone please help.
I have used the data control in the past to just view the data, but never add or update. Any experts in this area?
-
Please help???
-
I am pretty new at this, however I have some experience in DB programming. The only information that I can give you is to walk through the Database tutorial in this site. Karl Moore wrote it and it is excellent!
I read through it, and it was pretty easy to pick up on.
You will need to use and understand the ADO control, for adding records.
I hope this helps!
Lee
-
Thanks Lee M
Can it be done without the ADO control?
-
<?>
I have never used dbase only access mdb with dao. Does dbase use the same source information. Do you know how to start..ie open the database and read the information or set your datasource or anything?
-
Not a damn clue...
Just trying to learn... Really need to figure out.
Like I said before, I have used the data control to view the data, but now I must be able to read and write the data. The ONLY reason I am using dbase4 for this application is that it must be compatible with an old Lotus 5.0 spreadsheet based applications which uses dbase4 exclusively. (I won't bore you with all the details).
Please anyone help... ? ? ? !!!
-
Dear James...
I don't know whether this will help u or not. Currently, I'm using three databases. My primary database is SQL Server ver 7.0, my secondary database is Ms-Access 2000, and my last database is dBase III.
In Order to connect to those three databases, I'm using full hard-coding of database connection and recordset. I never use data control.
You can connect using ODBC DSN or DSN-less connection. But, for the easiest connection, I suggest u use ODBC DSN.
First of all, you should create a DSN name at your ODBC Data Administrator at your control panel system.
Let say your DSN Name is dBaseConn
your code will be (in ADO Connection) :
Code:
Sub Open_Database()
Dim myDB as New ADODB.Connection
Dim myRS as New ADODB.Recordset
Dim mySQL as String
myDB.Open "DSN=dBaseConn"
mySQL = ... you SQL statement ...
myRS.Open mySQL, myConn, adOpenDynamics, adLockOptimistics, adCmdText
If (myRS.BOF <> True) and (myRS.EOF <> True) Then
'Record Found...
............
'you can add new record...
myRs.AddNew
myRs!yourfield = yourvalue
.....
myRs.Update
End If
myRS.Close
myDB.Close
End Sub
ok ???
hope will help
Cheers,
Wen Lie
-
Thanks to all