Do not concatenate strings to build a SQL command. It leaves you wide open to accidental or deliberate SQL Injection attack which can destroy your entire database. Use Parametrized queries instead. And when you have a null value to pass through, replace it with DBNull. Value as the parameter. Sign in Email. Forgot your password? Ask a Question. Please Sign up or sign in to vote. See more: C. This is code behind logic Quote:.
Posted 4-Aug pm Meer Wajeed Ali. Add a Solution. DamithSL 5-Aug am. FormatDate and Helper. Meer Wajeed Ali 5-Aug am. Hi I updated my thread kindly check out and let me some possibilities CultureInfo "en-GB" ; return Convert. ParseExact date, format, System. Asked by:. Archived Forums.
Sign in to vote. I need to use isnull on a column in precedence constraints with datatype datetime,. Can any one please tell me how to test this null values in datetime column. Wednesday, December 15, PM. What are you passing as the second argument for the isnull? Russel Loski, MCT. String ToString System. String ' method, and this method cannot be translated into a store expression.
The text was updated successfully, but these errors were encountered:. Sorry, something went wrong. Why not just execute the ToString method on a list instead of the queryable? In that case you don't have issues with Linq-SQL. Skip to content. Core Public. Star 1. New issue. Jump to bottom. Copy link. I want to format a nullable datetime value, how can I do that?
0コメント