Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ole db's and retrieval of dates

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
When using an ole db, does coldfusion retrieve dates differently? What prompts this question is that I cannot get coldfusion to recognize a date in the WHERE section of SQL statement, when using an ole db. However, if I use an ODBC datasource, ColdFusion responds correctly and retrieves the record.

The variable that I use in the where section of the SQL statement is set equal to the present time using the now function, e.g., <cfset now = #now()#>

The SQL statement then makes use of that variable, e.g., <cfquery datasoure=&quot;Xxx&quot; name=&quot;XXX&quot;>
SELECT *
FROM The TABLE
Where BeginDate >= #NOW#
</cfquery>

Again, the code I wrote returns records when the Datasource is an ODBC datasource, but returns an error when the Datasource is an OLE DB datasource. Thus, the question is why is this happening.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top