The USA Linux Users Group Paste Bin

  • el
  • pt
  • This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

    The USA Linux Users Group Paste Bin

    Posted by Cerin on Thu 21st Sep 15:32 (modification of post by view diff)
    diff | download | new post

    1. The UDF:
    2.  
    3. create function [dbo].[testFunc]
    4. (
    5.         @futureDateFrom datetime = null,
    6.         @futureDateTo datetime = null
    7. )
    8.  
    9. The call:
    10.  
    11. <cfquery name="query" datasource="test">
    12.         select * from dbo.testFunc(
    13.                 <cfqueryparam cfsqltype="CF_SQL_DATE" value="#now()#">,
    14.                 <cfqueryparam cfsqltype="CF_SQL_DATE" value="#now()#">
    15.         )
    16. </cfquery>
    17.  
    18. The error:
    19.  
    20.  Error Executing Database Query.
    21. [Macromedia][SQLServer JDBC Driver][SQLServer]Conversion failed when converting datetime from character string.
    22.  
    23. The error occurred in C:\websites\test.cfm: line 146
    24.  
    25. 145 :         <cfqueryparam cfsqltype="CF_SQL_DATE" value="#now()#">,
    26. 146 :         <cfqueryparam cfsqltype="CF_SQL_DATE" value="#now()#">
    27. 147 :       )

    Submit a correction or amendment below. (click here to make a fresh posting)
    After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

    Use syntax highlighting

    To highlight particular lines, prefix each line with @@


    Remember my settings