Click here to Skip to main content
15,921,156 members

Comments by Member 11621437 (Top 7 by date)

Member 11621437 21-Apr-15 2:47am View    
I'll try to use the SQLServer "Convert" function
Member 11621437 21-Apr-15 2:39am View    
This works fine when directly executed in SQLServerManager, but always not from my VB.Net App. But I think your solution is the right way to resolve my problem. I my VB.Net Code, the line when the SQLAdapter fill the DataTable throws an exception for 'Invalid Date Format'. I have the local culture set to French in VB.Net an set to English in SQLServer. That's why I first try to give the dates to SQLServer only in numeric format
Member 11621437 20-Apr-15 8:51am View    
And, like I'vealready said, no query works when CommandType is set to "StoredProcedure"
Member 11621437 20-Apr-15 8:50am View    
Value of the query is :
<pre lang="SQL">
exec dbo.[DocumentFiltresOptime] N'Doc.TypeDocument in (2) and (Doc.DateCreation > ''2015/04/09'')';
</pre>

The SQL stored procedure accept as argument a filter as a nvarchar(256)
The filter is : N'Doc.TypeDocument in (2) and (Doc.DateCreation > ''2015/04/09'')'

The problem appears only when I use dates in the filter, never when I use simple strings
Member 11621437 20-Apr-15 8:49am View    
It doesn't work at all when I set the CommandType to StoredProcedure