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 strongm 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 Data Retrieval

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
The problem I am having is the retrieval of date/time fields in queries. The data is pulled without any problems when I use an ODBC datasource; however, when I switch everything to an OLE DB datasource, ColdFusion gives me an error message, even though the database I am using and the code I am using have not changed. The code I am using is listed below.

<cfquery …>
SELECT Date
FROM TblDates
WHERE Date >= ‘#Now()#’
</cfquery>

Does anyone know why this is not working? If you can answer this question, do you also know how switching from an ODBC datasource to an OLE DB datasource affects data retrieval, as I am also having problems with retrieving currency fields?
 
Sorry, can't help you with the OLE DB. But it is possible that the date comparisons aren't made correctly. Try using #dateformat(now(), &quot;mm/dd/yy&quot;)# or even #createodbcdate(now())# in your where statement.

bankholdup
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top