发表于:2005-01-17 18:07:00
3楼
Private Sub Command1_Click()
Dim strQueryAvg As String
Dim c As String
Dim r As String
Dim cnADO As New ADODB.Connection
Dim rsADO As Recordset
Set cnADO = New ADODB.Connection
cnADO.ConnectionString = "DSN = FIX Dynamics Real Time Data; UID = sa; PWD = ;"
cnADO.Open "FIX Dynamics Real Time Data", "sa", ""
Set rsADO = New ADODB.Recordset
rsADO.CursorType = adOpenKeyset
rsADO.LockType = adLockOptimistic
strQueryAvg = "Select A_TAG, A_CV, A_DESC FROM JK1 where A_TAG='" & Me!Text1 & "'"
'-----------rsADO.Open strQueryAvg, cnADO, adOpenForwardOnly, adLockBatchOptimistic
rsADO.Open strQueryAvg, cnADO
c = Me!Text2.Text
If rsADO.RecordCount <> 0 Then
rsADO.MoveFirst
'rsADO.Update A_CV, c
rsADO!A_CV = Me!Text2.Text
rsADO.Update
End If
'rsADO.Close 在此环境中禁止此操作
cnADO.Close
Set rsADO = Nothing
Set cnADO = Nothing
End Sub
代码改成这个样子,现在的错误是:“实时错误:[iFIX ODBC Driver][iFIX] Not support”
我怀疑ifix是不是根本不允许ADO去修改其实时数据库的内容?!!!!!!!!!!!!!!