已经排除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);
多了逗号
类型不匹配?