Tengo un problema con mi aplicacion.
Me da el siguiente error a la hora de realizar un consulta del tipo Select.
Consulta:
Código XML:
Ver original
<DbSource ConnectionRef="WALTConnectionString (Web.config)" DbObjectName="[COUNT]" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="FillCountByDate2" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetCountByLaunchDate2" GeneratorSourceName="FillCountByDate2" GetMethodModifier="Public" GetMethodName="GetCountByLaunchDate2" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetCountByLaunchDate2" UserSourceName="FillCountByDate2"> <SelectCommand> <DbCommand CommandType="Text" ModifiedByUser="true"> <CommandText>SELECT id_count, id_user, count_type, round, status, launch_date, comments, launched_by, counter_name, counter_mail, counter_phone, open_date, close_date FROM [COUNT] WHERE ([launch_date] <= ? ) AND ([launch_date] >= ? ) </CommandText> <Parameters> <Parameter AllowDbNull="true" AutogeneratedName="Param1" ColumnName="launch_date" DataSourceName="[COUNT]" DataTypeServer="DbType.Date" DbType="Date" Direction="Input" ParameterName="launch_date" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="launch_date" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="true" AutogeneratedName="Param2" ColumnName="launch_date" DataSourceName="[COUNT]" DataTypeServer="DbType.Date" DbType="Date" Direction="Input" ParameterName="launch_date2" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="launch_date" SourceColumnNullMapping="false" SourceVersion="Current" /> </Parameters> </DbCommand> </SelectCommand> </DbSource>
Al cambiar el <=/>= por el solo = funciona correctamente.
He probado la query directamente en la base de datos y me funciona bien.
No se porque me da ese error.
Muchas gracias de antemano.
Un saludo.