When I try to execute a query that compares a parameter with is null, I get an error "The specified argument value for the function is not valid. [ Argument #
= 1,Name of function(if known) = isnull ]"
This occurs with SQL Server CE 3.5 SP2 for Windows Mobile. With SQL Server CE 3.5 without SP1 or SP2 this error doesn't accurs.
dim connection As SqlCeConnection
dim sqlcmd As SqlCeCommand
connection = New SqlCeConnection("Data Source=\Storage Card\MyDatabase.sdf")
Dim strSql As String = "Select * from MyTable where (@MyParam is null or MyField= @MyParam ")
Dim param As New SqlCeParameter("@MyParam", DbType.DateTime)
View Complete Post