General information
Category:
Database DAO/RDO/ODBC/ADO
Title:
Error No. -2147217887 Microsoft ODBC
I am not understand, how come the below codes will occuring the error no. -2147217887 Microsoft ODBC Visual Foxpro Driver Invalid Parameters Number!
Is there something wrong in the ConnectionString? or may be the other else?
Dim cnData as ADODB.Connection
Dim rs as ADODB.Recordset
Dim mABCData as String
mABCData = app.path &"\ABC.DBC"
mConnectionString = "Driver={Microsoft Visual FoxPro Driver};UID=;PWD=;SourceDB=" & mABCData & ";SourceType=DBC;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"
cnData.ConnectionString = mConnectionString
cnData.ConnectionTimeout = 30
cnData.CursorLocation = adUseClient
cnData.Open
rsPAC.Open mSQL, MDIABC.cnData, adOpenKeyset, adLockOptimistic
rsPAC.MoveLast
If optSetup1.Value = True Then
rsPAC!BODC1 = chkOTC.Value
End If
If optSetup2.Value = True Then
rsPAC!BODC2 = chkOTC.Value
End If
For mOption = 1 To 2
For mPAC = 0 To 23
mPulseField = IIf(optSetup1.Value = True, "U", "A") & "P" & Trim(Str(mOption)) & PadToString(mPAC, 2)
mCostField = IIf(optSetup1.Value = True, "U", "A") & "C" & Trim(Str(mOption)) & PadToString(mPAC, 2)
If mOption = 1 Then
rs(mPulseField) = TDBGrid1.Columns(1).Text
rs(mCostField) = TDBGrid1.Columns(2).Text
Else
rs(mPulseField) = TDBGrid1.Columns(3).Text
rs(mCostField) = TDBGrid1.Columns(4).Text
End If
Next mPAC
Next mOption
rs.Update
rs.Close
TQ very very much
Best regards
Winan
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only