I am trying to use DAO to access Foxpro tables in VB6. Everything is going well, except, I cannot get write access to the fox tables. The code I am using follows. If anyone has any suggestions, please let me know:<br>
<br>
<br>
Sub Test()<br>
<br>
Dim dbs As Database, rstPlayers As Recordset<br>
Dim strName As String<br>
<br>
Set dbs = OpenDatabase("c:\develop\DAOtest", True, False, "FoxPro 2.6")<br>
<br>
Rem this is Read/Write<br>
If dbs.Updatable Then<br>
MsgBox ("DB Read/Write")<br>
Else<br>
MsgBox ("DB Read-Only")<br>
End If<br>
<br>
Set rstPlayers = dbs.OpenRecordset("players")<br>
<br>
Rem this, no matter what I try, is always Read-Only<br>
If rstPlayers.Updatable Then<br>
MsgBox ("Table Read/Write")<br>
Else<br>
MsgBox ("Table Read-Only")<br>
End If<br>
<br>
rstPlayers.MoveFirst<br>
While Not rstPlayers.EOF<br>
strName = rstPlayers!Name<br>
MsgBox (strName)<br>
rstPlayers.MoveNext<br>
Wend<br>
<br>
rstPlayers.Close<br>
dbs.Close<br>
<br>
End Sub
<br>
<br>
Sub Test()<br>
<br>
Dim dbs As Database, rstPlayers As Recordset<br>
Dim strName As String<br>
<br>
Set dbs = OpenDatabase("c:\develop\DAOtest", True, False, "FoxPro 2.6")<br>
<br>
Rem this is Read/Write<br>
If dbs.Updatable Then<br>
MsgBox ("DB Read/Write")<br>
Else<br>
MsgBox ("DB Read-Only")<br>
End If<br>
<br>
Set rstPlayers = dbs.OpenRecordset("players")<br>
<br>
Rem this, no matter what I try, is always Read-Only<br>
If rstPlayers.Updatable Then<br>
MsgBox ("Table Read/Write")<br>
Else<br>
MsgBox ("Table Read-Only")<br>
End If<br>
<br>
rstPlayers.MoveFirst<br>
While Not rstPlayers.EOF<br>
strName = rstPlayers!Name<br>
MsgBox (strName)<br>
rstPlayers.MoveNext<br>
Wend<br>
<br>
rstPlayers.Close<br>
dbs.Close<br>
<br>
End Sub