询问:
SELECT [VehicleId], [VehicleNumber], [VehicleBrand], [VehicleName], [ModelYear], [PurchasePrice]
FROM [VehicleMaster]
WHERE ([VehicleType]=@VehicleType or @VehicleType = '') and
([VehicleNumber]=@VehicleNumber or @VehicleNumber is null) and
([SaleStatus] = @SaleStatus or @SaleStatus = '-Select-') and
([OwnershipStatus]=@OwnershipDetail or @OwnershipDetail = '-Select-') and
([ModelYear] between @YearFrom and @YearTo or (@YearFrom = 'Year' and @YearTo = 'Year'))
标记:
<SelectParameters>
<asp:SessionParameter Name="VehicleType" SessionField="VehicleType" Type="String" />
<asp:SessionParameter Name="VehicleNumber" SessionField="VehicleNumber" Type="String" />
<asp:SessionParameter Name="SaleStatus" SessionField="SalesStatus" Type="String" />
<asp:SessionParameter Name="OwnershipDetail" SessionField="OwnershipStatus" Type="String" />
<asp:SessionParameter Name="YearFrom" SessionField="YearFrom" Type="Int32" ConvertEmptyStringToNull="true" />
<asp:SessionParameter Name="YearTo" SessionField="YearTo" Type="Int32" ConvertEmptyStringToNull="true" />
</SelectParameters>
错误:
输入字符串的格式不正确.e....