Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to connect to Paradox 4.5 for read/write access
Message
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
How to connect to Paradox 4.5 for read/write access
Divers
Thread ID:
00579138
Message ID:
00579138
Vues:
52
I can't get VB to write to the Pdox database. I can read from Pdox and query it's tables just fine. I am running with Jet4 SP5 which Microsoft states is required to write into the db. Has anyone done this and can you share with me how?

Much thanks in advance for any tips on this issue.

Here is the code as it stands now. It executes fine but does nothing.

**********************************************************************
Set cnPdox = New Connection
cnPdox.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0" & _
";Data Source=" & CurrDir & _
";Extended Properties=Paradox 4.x;"
cnPdox.Mode = adModeReadWrite
cnPdox.CursorLocation = adUseClient
' cnPdox.IsolationLevel = adXactIsolated 'May not be correct.
cnPdox.Open


Private Sub Command1_Click()
Dim rstTitles As New ADODB.Recordset

Set rstTitles = New ADODB.Recordset
rstTitles.CursorType = adOpenKeyset
rstTitles.LockType = adLockBatchOptimistic
rstTitles.Open "MethCont", cnPdox, , , adCmdTableDirect

cnPdox.BeginTrans
rstTitles.AddNew
rstTitles("Contract number") = "00000000"
rstTitles("Contract name") = Text2.Text
rstTitles.Update
cnPdox.CommitTrans
rstTitles.Close

***************************************************************************

Regards,
John
Répondre
Fil
Voir

Click here to load this message in the networking platform