开发者

A parameter is missing. [ Parameter ordinal = 1 ] error in Pocket PC Application

Following code doesnt work and raise error "A parameter is missing. [ Parameter ordinal = 1 ]".What s wrong with it?I am developing pocket pc application in vs 2008 and sqlce 3.5 sp1.

  Comm.CommandText = "Insert Into TR_FATURA_DETAY(ID_FATURA,ID_SIPARIS_DETAY,ID_MAMUL_BARKOD,MT_MIKTAR,MT_KARSILANAN_MIKTAR,MT_BIRIM_FIYAT,MT_BRUT_TUTAR,MT_NOKTA_ISKONTO_ORANI,MT_NOKTA_ISKONTO_TUTARI,MT_SATAL_ISKONTO_ORANI,MT_CIRO_ISKONTO_ORANI,MT_SATIR_KAMPANYA_TUTARI,MT_SATIR_INDIRIM_TUTAR,MT_KDV_ORANI,MT_KDV_TUTARI,ID_IPTAL_SEBEP,DS_ACIKLAMA,ID_IADE_SEBEP,FATURA_SATIR_NO,ID_SIPARIS_HAREKET_TIPI,MT_OZEL_MATRAH_KDV,MT_PLASIYER_ISKONTO_ORANI,MT_PLASIYER_ISKONTO_TUTARI) Values (?,?,?,?开发者_JAVA百科,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"
                With Comm.Parameters
                    .Add("@ID_FATURA", IdFaturaValue)
                    .Add("@ID_SIPARIS_DETAY", dr2("ID_SIPARIS_DETAY"))
                    .Add("@ID_MAMUL_BARKOD", dr2("ID_MAMUL_BARKOD"))
                    .Add("@MT_MIKTAR", dr2("MT_MIKTAR"))
                    .Add("@MT_KARSILANAN_MIKTAR", dr2("MT_MIKTAR"))
                    '.Add("@MT_AGIRLIK", MT_AGIRLIK)
                    .Add("@MT_BIRIM_FIYAT", dr2("MT_BIRIM_FIYAT"))
                    .Add("@MT_BRUT_TUTAR", dr2("MT_BRUT_TUTAR"))
                    .Add("@MT_NOKTA_ISKONTO_ORANI", dr2("MT_NOKTA_ISKONTO_ORANI"))
                    .Add("@MT_NOKTA_ISKONTO_TUTARI", dr2("MT_NOKTA_ISKONTO_TUTARI"))
                    .Add("@MT_SATAL_ISKONTO_ORANI", dr2("MT_SATAL_ISKONTO_ORANI"))
                    .Add("@MT_CIRO_ISKONTO_ORANI", dr2("MT_CIRO_ISKONTO_ORANI"))
                    .Add("@MT_SATIR_KAMPANYA_TUTARI", dr2("MT_SATIR_KAMPANYA_TUTARI"))
                    .Add("@MT_SATIR_INDIRIM_TUTAR", dr2("MT_SATIR_INDIRIM_TUTAR"))
                    .Add("@MT_KDV_ORANI", dr2("MT_KDV_ORANI"))
                    .Add("@MT_KDV_TUTARI", dr2("MT_KDV_TUTARI"))
                    .Add("@ID_IPTAL_SEBEP", dr2("ID_IPTAL_SEBEP"))
                    .Add("@DS_ACIKLAMA", dr2("DS_ACIKLAMA"))
                    .Add("@ID_IADE_SEBEP", 0)
                    .Add("@FATURA_SATIR_NO", dr2("SIRA_NO"))
                    .Add("@ID_SIPARIS_HAREKET_TIPI", dr2("ID_SIPARIS_HAREKET_TIPI"))
                    .Add("@MT_OZEL_MATRAH_KDV", dr2("MT_OZEL_MATRAH_KDV"))
                    .Add("@MT_PLASIYER_ISKONTO_ORANI", dr2("MT_PLASIYER_ISKONTO_ORANI"))
                    .Add("@MT_PLASIYER_ISKONTO_TUTARI", dr2("MT_PLASIYER_ISKONTO_TUTARI"))
                End With
    Comm.Prepare()
                    Comm.ExecuteNonQuery()


After installed sqlce sp2,problem was solved

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜