首页新闻找找看学习计划

SQLite error Insufficient parameters supplied to the command的问题

0
悬赏园豆:30 [已解决问题] 解决于 2015-01-15 14:03

已经排除SQLiteParameter数量不对,命名错误这些基本的问题了,还有哪些情况会导致这个错误

StringBuilder strSql = new StringBuilder();
strSql.Append("INSERT INTO LocationOtherInfo (LocationID,PavedSpaces,UnPavedSpaces,EnterBuildingFrom,AlternativeEntranceLocation,FrontDoorEntrance,AlternativeEntranceSignNeed,");
strSql.Append("IsAlternativeEntranceSignNeed,ParkingEntrance,ParkingEntranceFeet,ParkAreaLighting,AccessCode,TotalSetKey,WhoOpens,BuildingSignAvailable,ParkingSignAvailable,");
strSql.Append("TrafficMiscNote,IsHandicappedAccess,LocationDisabledEntrance,RampAvailable,DisabledParkingSpaces,TypeDisabledPath,IsPWClearVotingArea,UseableBuildingsTables,");
strSql.Append("UseableBuildingsChairs,IsHasKitchen,IsHasMicrowave,IsHasFridge,PhoneNum,PhoneDialingInstruction,PhoneLocation,PhoneNote,PhoneLineNeed,ModemLineNeed,ModemUsesSamePhoneLine,");
strSql.Append("ModemNum,ModemDialingInstruction,CreateTime,OfficeNum,FaxNum,NeedAccessCode,NeedRampAvailable,LanDHCP,LanDefaultGateway,LanPreferredDNS,LanAlternateDNS,LanSubnetMask,");
strSql.Append("VoteSigns,VoteDirectional,FacilityPay,AccBox1,AccBox2,FentAmount,Insurance,ParkingCones,MachinesNum,IsHasKey,IsKeyProvideBuild,DoorCode,AlarmCode,OpeningComments,");
strSql.Append("FirstName,LastName,Title,Phone)");
strSql.Append(" VALUES (@LocationID,@PavedSpaces,@UnPavedSpaces,@EnterBuildingFrom,@AlternativeEntranceLocation,@FrontDoorEntrance,@AlternativeEntranceSignNeed,");
strSql.Append("@IsAlternativeEntranceSignNeed,@ParkingEntrance,@ParkingEntranceFeet,@ParkAreaLighting,@AccessCode,@TotalSetKey,@WhoOpens,@BuildingSignAvailable,@ParkingSignAvailable,");
strSql.Append("@TrafficMiscNote,@IsHandicappedAccess,@LocationDisabledEntrance,@RampAvailable,@DisabledParkingSpaces,@TypeDisabledPath,@IsPWClearVotingArea,@UseableBuildingsTables,");
strSql.Append("@UseableBuildingsChairs,@IsHasKitchen,@IsHasMicrowave,@IsHasFridge,@PhoneNum,@PhoneDialingInstruction,@PhoneLocation,@PhoneNote,@PhoneLineNeed,@ModemLineNeed,@ModemUsesSamePhoneLine,");
strSql.Append("@ModemNum,@ModemDialingInstruction,@CreateTime,@OfficeNum,@FaxNum,@NeedAccessCode,@NeedRampAvailable,@LanDHCP,@LanDefaultGateway,@LanPreferredDNS,@LanAlternateDNS,@LanSubnetMask,");
strSql.Append("@VoteSigns,@VoteDirectional,@FacilityPay,@AccBox1,@AccBox2,@FentAmount,@Insurance,@ParkingCones,@MachinesNum,@IsHasKey,@IsKeyProvideBuild,@DoorCode,@AlarmCode,@OpeningComments,");
strSql.Append("@FirstName,@LastName,@Title,@Phone)");

SQLiteParameter[] values = new SQLiteParameter[]
{
new SQLiteParameter("@LocationID", dbRow["RecordGUID"]),
new SQLiteParameter("@PavedSpaces", dbRow["PavedSpaces"]),
new SQLiteParameter("@UnPavedSpaces", dbRow["UnPavedSpaces"]),
new SQLiteParameter("@EnterBuildingFrom", dbRow["EnterBuildingFrom"]),
new SQLiteParameter("@AlternativeEntranceLocation", dbRow["AlternativeEntranceLocation"]),
new SQLiteParameter("@FrontDoorEntrance", dbRow["FrontDoorEntrance"]),
new SQLiteParameter("@AlternativeEntranceSignNeed", dbRow["AlternativeEntranceSignNeed"]),
new SQLiteParameter("@IsAlternativeEntranceSignNeed", dbRow["IsAlternativeEntranceSignNeed"]),
new SQLiteParameter("@ParkingEntrance", dbRow["ParkingEntrance"]),
new SQLiteParameter("@ParkingEntranceFeet", dbRow["ParkingEntranceFeet"]),
new SQLiteParameter("@ParkAreaLighting", dbRow["ParkAreaLighting"]),
new SQLiteParameter("@AccessCode", dbRow["AccessCode"]),
new SQLiteParameter("@TotalSetKey", dbRow["TotalSetKey"]),
new SQLiteParameter("@WhoOpens", dbRow["WhoOpens"]),
new SQLiteParameter("@BuildingSignAvailable", dbRow["BuildingSignAvailable"]),
new SQLiteParameter("@ParkingSignAvailable", dbRow["ParkingSignAvailable"]),
new SQLiteParameter("@TrafficMiscNote", dbRow["TrafficMiscNote"]),
new SQLiteParameter("@IsHandicappedAccess", dbRow["IsHandicappedAccess"]),
new SQLiteParameter("@LocationDisabledEntrance", dbRow["LocationDisabledEntrance"]),
new SQLiteParameter("@RampAvailable", dbRow["RampAvailable"]),
new SQLiteParameter("@DisabledParkingSpaces", dbRow["DisabledParkingSpaces"]),
new SQLiteParameter("@TypeDisabledPath", dbRow["TypeDisabledPath"]),
new SQLiteParameter("@IsPWClearVotingArea", dbRow["IsPWClearVotingArea"]),
new SQLiteParameter("@UseableBuildingsTables", dbRow["UseableBuildingsTables"]),
new SQLiteParameter("@UseableBuildingsChairs", dbRow["UseableBuildingsChairs"]),
new SQLiteParameter("@IsHasKitchen", dbRow["IsHasKitchen"]),
new SQLiteParameter("@IsHasMicrowave", dbRow["IsHasMicrowave"]),
new SQLiteParameter("@IsHasFridge", dbRow["IsHasFridge"]),
new SQLiteParameter("@PhoneNum,", dbRow["PhoneNum"]),
new SQLiteParameter("@PhoneDialingInstruction", dbRow["PhoneDialingInstruction"]),
new SQLiteParameter("@PhoneLocation", dbRow["PhoneLocation"]),
new SQLiteParameter("@PhoneNote", dbRow["PhoneNote"]),
new SQLiteParameter("@PhoneLineNeed", dbRow["PhoneLineNeed"]),
new SQLiteParameter("@ModemLineNeed", dbRow["ModemLineNeed"]),
new SQLiteParameter("@ModemUsesSamePhoneLine,", dbRow["ModemUsesSamePhoneLine"]),
new SQLiteParameter("@ModemNum", dbRow["ModemNum"]),
new SQLiteParameter("@ModemDialingInstruction", dbRow["ModemDialingInstruction"]),
new SQLiteParameter("@CreateTime", dbRow["CreateTime"]),
new SQLiteParameter("@OfficeNum", dbRow["OfficeNum"]),
new SQLiteParameter("@FaxNum", dbRow["FaxNum"]),
new SQLiteParameter("@NeedAccessCode", dbRow["NeedAccessCode"]),
new SQLiteParameter("@NeedRampAvailable", dbRow["NeedRampAvailable"]),
new SQLiteParameter("@LanDHCP", dbRow["LanDHCP"]),
new SQLiteParameter("@LanDefaultGateway", dbRow["LanDefaultGateway"]),
new SQLiteParameter("@LanPreferredDNS", dbRow["LanPreferredDNS"]),
new SQLiteParameter("@LanAlternateDNS", dbRow["LanAlternateDNS"]),
new SQLiteParameter("@LanSubnetMask", dbRow["LanSubnetMask"]),
new SQLiteParameter("@VoteSigns", dbRow["VoteSigns"]),
new SQLiteParameter("@VoteDirectional", dbRow["VoteDirectional"]),
new SQLiteParameter("@FacilityPay", dbRow["FacilityPay"]),
new SQLiteParameter("@AccBox1", dbRow["AccBox1"]),
new SQLiteParameter("@AccBox2", dbRow["AccBox2"]),
new SQLiteParameter("@FentAmount", dbRow["FentAmount"]),
new SQLiteParameter("@Insurance", dbRow["Insurance"]),
new SQLiteParameter("@ParkingCones", dbRow["ParkingCones"]),
new SQLiteParameter("@MachinesNum", dbRow["MachinesNum"]),
new SQLiteParameter("@IsHasKey", dbRow["IsHasKey"]),
new SQLiteParameter("@IsKeyProvideBuild", dbRow["IsKeyProvideBuild"]),
new SQLiteParameter("@DoorCode", dbRow["DoorCode"]),
new SQLiteParameter("@AlarmCode", dbRow["AlarmCode"]),
new SQLiteParameter("@OpeningComments", dbRow["OpeningComments"]),
new SQLiteParameter("@FirstName", dbRow["FirstName"]),
new SQLiteParameter("@LastName", dbRow["LastName"]),
new SQLiteParameter("@Title", dbRow["Title"]),
new SQLiteParameter("@Phone", dbRow["Phone"]),
};

SQLiteHelper.ExecuteSql(strSql.ToString(), tran, values);

腐乳的主页 腐乳 | 初学一级 | 园豆:12
提问于:2014-12-02 16:19
< >
分享
最佳答案
0

多了逗号

腐乳 | 初学一级 |园豆:12 | 2014-12-03 13:07
其他回答(1)
0

类型不匹配?

收获园豆:30
风醉 | 园豆:1197 (小虾三级) | 2014-12-02 16:27
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册