Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error No. -2147217887 Microsoft ODBC
Message
De
11/01/2001 03:16:40
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
Error No. -2147217887 Microsoft ODBC
Divers
Thread ID:
00462093
Message ID:
00462093
Vues:
63
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
Répondre
Fil
Voir

Click here to load this message in the networking platform