This is first app using ADO, previously using DAO.
I have 3 linked tables in an open connection, when I add a new record information from link tables don't show.
What am I doing wrong?
ON DAO whe you add a new record it immediately updates the related field for to the link table. This a very valuable feature on DAO, now Can I do this on ADO?
This is my code:
Public Train_Conn As New ADODB.Connection
Public gRDB_RS As ADODB.Recordset
sNewConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Z:\GlobalApps\Training\Training.mdb;Persist Security Info=False"
Train_Conn.ConnectionString = sNewConnectionString
Train_Conn.CursorLocation = adUseServer
Train_Conn.Mode = adModeReadWrite
Train_Conn.Open
Set gRDB_RS = New ADODB.Recordset
gRDB_RS.Open stgSQL, Train_Conn, _
adOpenKeyset, _
adLockOptimistic
'After connection opens
If cmbProcess.ListIndex <> 0 Then
gRDB_RS.Filter = "SheetID=" & cmbProcess.ItemData(cmbProcess.ListIndex)
Else
gRDB_RS.Filter = adFilterNone
End If
Set gTRAIN.DataSource = gRDB_RS
'Where gTrain is a grid.
Thanks for your help guys.
Lulo
I have 3 linked tables in an open connection, when I add a new record information from link tables don't show.
What am I doing wrong?
ON DAO whe you add a new record it immediately updates the related field for to the link table. This a very valuable feature on DAO, now Can I do this on ADO?
This is my code:
Public Train_Conn As New ADODB.Connection
Public gRDB_RS As ADODB.Recordset
sNewConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Z:\GlobalApps\Training\Training.mdb;Persist Security Info=False"
Train_Conn.ConnectionString = sNewConnectionString
Train_Conn.CursorLocation = adUseServer
Train_Conn.Mode = adModeReadWrite
Train_Conn.Open
Set gRDB_RS = New ADODB.Recordset
gRDB_RS.Open stgSQL, Train_Conn, _
adOpenKeyset, _
adLockOptimistic
'After connection opens
If cmbProcess.ListIndex <> 0 Then
gRDB_RS.Filter = "SheetID=" & cmbProcess.ItemData(cmbProcess.ListIndex)
Else
gRDB_RS.Filter = adFilterNone
End If
Set gTRAIN.DataSource = gRDB_RS
'Where gTrain is a grid.
Thanks for your help guys.
Lulo