Coldfusion - search parameters - CreateODBCDate

I want to enable a user to enter a start and end date to
define the period they want to search for records of members who
joined on certain dates. Funny thing is...I've got it to work half
of the time. For e.g. I have 4 records between 26/10/2005 and
1/08/2006. When I enter 01/01/2005 as startDate and 31/08/2006 as
endDate, I get the 4 records. However, if I alter the endDate to
01/09/2006 I get every record in the database!!!??? Why's this? I
can't get my head around it!
Here's my code:
First the code for the form the user input the search
criteria on:
<html>
<body>
<FORM action="memberJDateSearch.cfm" method="post">
<p>Start Date: <input type="text"
name="startDate">
<br>End Date: <input type="text" name="endDate">
<input type="reset" value="Clear">
<input type="submit" value="Submit">
</FORM>
</body>
</html>
Simple enough. Now the code for the process and display page:
<html>
<body>
<cfquery name="memberJDateSearch"
datasource="jpkelle2-access">
SELECT *
From members
WHERE ((joinDate BETWEEN #CreateODBCDate(startDate)# AND
#CreateODBCDate(endDate)#))
</cfquery>
<table border=1 bgcolor="beige" cellpadding="3"
cellspacing="0">
<tr>
<th>Member ID</th>
<th>Name</th>
<th>Sex</th>
<th>Date of Birth</th>
<th>Address</th>
<th>Email</th>
<th>Date Joined</th>
</tr>
<CFOUTPUT Query="memberJDateSearch">
<tr>
<td><center>#memberID#<center></td>
<td width="15%">#forename# #initial#
#surname#</td>
<td>#sex#</td>
<td width="10%">#disp('#dob#')#</td>
<td>#address#, #town#, #county#, #postCode#</td>
<td>#email#</td>
<td width="10%">#disp('#joinDate#')#</td>
</tr>
</CFOUTPUT>
</table>
<hr><p>End of members list.</p>
</body>
</html>
any ideas? please help me.

Do you have debugging turned on? What does the actual sql
look like?
As an aside, you don't need the double brackets in your where
clause.

Similar Messages

  • The collection you specified does not exists or is not registered with the ColdFusion Search Service.

    While upgrading to CF7 from CF5, I am creating the new collections from Cf Admin. After creating, I indexed it from cf admin and then trying to search for the documents in that collection, and i am getting the following error. This was working yesterday. I have cheched the logs etc and nothing seems helpful in discovering what the issue is.
    Document count is 11,745 and the size is 25,948 kb, which is not too much for a collection. I have tried to restart Cold Fusion Search Services and then ColdFusion Application services, but all in vain.
    Any help on this would be greatly appreciated.
    Detail
    The collection you specified does not exists or is not registered with the ColdFusion Search Service.
    Message
    The collection rc_collectiom does not exist.
    StackTrace
    coldfusion.tagext.search.CollectionDoesNotExistException: The collection rc_collectiom does not exist. at coldfusion.tagext.search.SearchTag.verifyLocale(SearchTag.java:819) at coldfusion.tagext.search.SearchTag.doSearch(SearchTag.java:200) at coldfusion.tagext.search.SearchTag.doStartTag(SearchTag.java:159) at coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1915) at cfeFull2dText2dReDirect2ecfm511389924.runPage(C:\Inetpub\wwwroot\External\FullText\eFull- Text-ReDirect.cfm:43) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:349) at coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1915) at cfApplication2ecfc179940445$funcONREQUEST.runFunction(C:\Inetpub\wwwroot\External\Applica tion.cfc:114) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:344) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:290) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:254) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:207) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:169) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:194) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:146) at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:72) at coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:178) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:215) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:51) at coldfusion.filter.PathFilter.invoke(PathFilter.java:86) at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69) at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:115) at coldfusion.CfmServlet.service(CfmServlet.java:107) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:318) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:426) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:264) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

    So at last I figured this out myself and found a temporary resolution for this kind of problem. Majority of the times try creating the Collection through Cfcollection tag and then index it using cfindex tag, rather than performing these operations from the Cold Fusion 7 administrator.
    The only reason I can think of which might have caused the issue is – I have thousands of documents in the collection which I indexed. So while indexing the page gets expired. So I tried again to index it. This time the collection got indexed fairly quickly and I got the response that the collection has been indexed successfully. So for the first time when I tried to index the collection, there might be some piece of code, which did not register the collection properly and hence giving this error.
    When I did the same function using the code, with exactly same set of documents, it did not throw any error, even when I executed it for the first time. So the collection indexed properly.
    I am not claiming that technically this theory is correct, but this seems to be the problem.
    If someone knows technically what has happened at the back, please share it. For the time being, this is the fix – if you experience any problem in creating/indexing collections through cfadmin in CF7, do it thorough code.

  • Search parameters are getting cleared after search result

    Hi ,
    We have created z component with search and search result view based on only value nodes.
    we are able to get search result with the give search criteria. After getting result   search parameters are getting refreshed.
    how to keep those values in search parameters.   which method i need to redefine..... what will be the part of code.
    Please suggest .
    thanks
    ram

    Hi,
    You have to set the search field values after the result obtained. I believe you can find this in any of the standard advanced search components - BT111S_OPPT etc. for reference.
    Regards,
    Harish P M

  • CTL-F = ColdFusion Search = BROKEN = PLEASE HELP!!!

    I'm using CF Builder Version: 2.0.0, Build: 278082 (I just installed hotfix 1 hoping that would solve these problems, but it didn't)
    1) Using the ColdFusion Search between files doesn't work for me. Example: CTL-F (opens CF Search dialog) and I paste in "cfoutput" (without the quotes). I repeatedly hit the Find button and cycle through all the matches in the document. Then I select a different document, the ColdFusion Search dialog is still on top, I click the "Find" button and nothing happens. The ColdFusion Search dialog doesn't do anything, even though there are matches in the current document. I have to close the dialog, hit CTL-F again, and re-execute the search. This is completely different from the eclipse Find dialog behavior, where you can conduct the same search after switching the current document.
    2) Why do multiple ColdFusion Search dialogs open? I can open as many as I want by entering CTL-F. Shouldn't it just select the dialog if it's already open? I don't get it.
    Also, the CF Search dialog window position is not saved, which adds a lot more clicks to my work flow!
    I must be missing something here... this is either broken or I'm not understanding something. Or better yet, maybe I can have my old eclipse find dialog back!!!
    Thanks in advance!
    -JP

    Here are the bugs I created... would be great if they got votes. I cannot use CFB 2 without fixes to these problems because I rely on CTL-F to work correctly. I'm not sure how these things passed QA... it's a far departure from the way std. eclipse and CFB 1 work. At the very least, we need a patch or workaround that will allow us to turn off ColdFusion Search and use the built in eclipse Find dialog.
    ColdFusion Search "Current Document" scope does not work when selecting a different file
    https://bugbase.adobe.com/index.cfm?event=bug&id=2999830
    ColdFusion Search does not save settings
    https://bugbase.adobe.com/index.cfm?event=bug&id=2999795
    There is no way to disable multiple ColdFusion Search dialogs
    https://bugbase.adobe.com/index.cfm?event=bug&id=2999818

  • IOS7 mail search results appear to be random by date also where are the search parameters, from to etc..? help!

    Mail search returns results by random date. Where are the mail search parameters, from,to,etc?

    This is really annoying. Mail search on iOS 7 never worked, either on iPhone
    4S or on iPad.
    Search results are not sorted in any perceivable order. I get totally random results, with messages dating 4 years back jumping to yesterday and so on.
    I have never seen Apple to respond to this issue with earnest feedback, and users are often dismissed.
    I used to have to resort to my Macbook Pro to get decent results, but due to the many mail app problems on OSX, I do not rely on it anymore.
    Can Apple please give feedback to this search issue on the IOS devices? It is really, REALLY crippling.

  • CF8 Verity "The collection you specified does not exist or is not registered with the ColdFusion Search Service."

    I'm running ColdFusion 8 Enterprise on linux. I'm able to
    create collections and index them through cfadmin as well as in cfm
    application pages, but when trying to search I get the error
    &quot;The collection you specified does not exist or is not
    registered with the ColdFusion Search Service.&quot;
    I'm using the collection name in cfsearch and not the full
    path.

    Would I have been better off posting this in the General
    Discussion section? Could the moderators move it if so,
    please?

  • Search parameters/ filters for bookmark library

    Hi,
    Does Firefox's bookmark library search bar support any kind of search parameters or exclusion filters? For example, infolder:Blogs.
    My search results are always distorted by the RSS feeds that I subscribe to. That's why I'm trying to filter them out, either by filtering out the entire "bookmarks toolbar" folder (where I keep all the feeds) or to filter out bookmarks of type RSS if possible.
    Would appreciate advice on this; there seems to be little information on this.

    See [/questions/759909]

  • Is there any way to change the default search parameters in Mail?

    When I do a search it only checks "Today" instead of "Inbox."  So then I have to select Inbox and reenter my search.  Not a huge deal, but a bit bothersome. Any way to just set it to search "Inbox" by default instead of "Today?"

    No. You will see many posts about tinker tool ,but that wont change Adobe Apps fonts, only apple applications.

  • Defining search parameters in ical.

    Hi folks, I'm trying to find a way to search for recurring appointments with clients but finding 2011 data cluttering my 2012 search.  Can I search from say December 2011 to December 2012.
    thanks
    Dave

    Whatever os you have installed, post in its forum area.

  • Translate search parameters to lower and upper case

    Hi All,
    I need to create a search function. Is it possible to translate the search paramaters to  both upper and lower case because inside the data there are data with upper case or lower case or both.
    Thanks in advance.

    Hi ,
      As per your requirement you have to write logic for three conditions :
    1. Translate whole word into upper case .
        TRANSLATE  your field name  TO UPPERCASE.
    2. Translate whole word into lower case .
        TRANSLATE  your field name  TO LOWERCASE.
    3. First character of your field should be in uppercase rest in lower case .
    so write your logic now considering third point also .
    Regards ,
    Nilesh Jain .

  • I wish to embed firefox search into my website and to control the search parameters.

    Sirs,
    I want a search tool on my website.
    I want to be able to pre-set which sites it will search.
    For example certain newspapers for related articles, or government online databases.
    Can I do this with Firefox?

    Make sure that you are using the '''"Remember History"''' setting as described in this article -> [[Options window - Privacy panel]]
    Check and tell if its working.

  • ColdFusion Search with Excel Sheet creation

    I created a form search with two buttons - one for results on the web page and one to create an excel sheet.
    Problem: When a user conducts a search with results on the web page - the user would have to select the criteria again then click the create excel button to create the sheet.
    How can I work it, so the user after conducting a search can just click one button to create the excel sheet?
    (Using "Post" for the form - will change to get if needed will your help)

    I'm still freshman with CF - this means I have a lot of questions.
    When I tried using the excel.cfm page I receive: Variable MRESULTS is undefined.
    How do I send "mresults" to the excel page?
    Search Page Link:
       <a href="javascript:document.
    getElementById('yourForm').submit()">Excel</a>
          <form id="yourForm" action="excel.cfm" method="post">
                 <!--- save search values sent via POST --->
                 <cfoutput>
                 <input name="ship" value="#mresults.ship#">
                 </cfoutput>
          </form>
    Excel page:
    <cfquery name="MResults"
             datasource="support">
    select *
    from table1
    <cfform action="/msr/excel.cfm" method="post"> 
    <cfset sObj=SpreadsheetNew()>
    <!--- Create header row --->
    <cfset SpreadsheetAddRow(sObj, "Name,address")>
    <cfset SpreadsheetFormatRow(sObj, {bold=TRUE,fgcolor="grey_25_percent", alignment="center"}, 1)>
    <cfset SpreadsheetFormatColumn(sObj, {alignment="left", dataformat="mm/dd/yyyy"}, 14)>
    <cfset SpreadsheetAddRows(sObj, MResults)>
    <cfspreadsheet action="write" name="sObj" filename="C:Orders.xls" overwrite="true">
    <cfheader    name="Content-Disposition"
                            value="inline; filename=Orders.xls">
                <cfcontent    type="application/csv"
                            file="C:\Orders.xls"
                            deletefile="yes">
    </cfform>
    </cfquery>

  • Need a quick answer on advanced search parameters

    I am an IT professional, but am not a regular Thunderbird user. I have an e-discovery need to search for multiple terms in a mailbox. The best solution I have found for this is to export the mailbox from Google Apps as an .mbox, and use the importexporttools extension for Thunderbird to import the .mbox.
    I then have the mails in a local folder, and right-click on the folder and click on search messages. A number of filters appear, and I put in my terms, select to search within body, for Any results.
    This works fine for me but I have two questions:
    1. How can I search for something with an apostrophe in it?
    For example, if I needed to search for:
    '123abc
    How would I do it? Quotes? Is there an escape character to state that that needs to be taken literally and isn't a quote or part of a command?
    2. Does the search I am performing, or any other way of searching, search within attachments? In Google Apps I can search within attachments - such as text files, or Microsoft Office documents. Is this possible to do?
    I searched through the help files and FAQs, but I am not sure if I am using quick filter, or global search etc.
    Thanks!

    There are different methods of searching.
    '''Quick Filter:'''
    The Quick Filter can be used to search in the selected folder. There are additional filters to refine the search.
    * https://support.mozilla.org/en-US/kb/quick-filter-toolbar
    '''Global Search: '''
    The Global Search can be used to search all accounts. There are additional filters to refine the search.
    * https://support.mozilla.org/en-US/kb/global-search
    '''Account and folder specific Search:'''
    'Edit' > 'Find' > 'Search Messages'
    or
    'Menu Icon' > 'Find' > 'Search Messages'
    A new window opens.
    At the top you will see: 'Search for messages in' and you can select the mail account or specific folder from the drop down selection. You can choose to 'Search subfolders' if required.
    If you are using one search criteria (condition) or more than one but they all must be true, then select 'Match all of the following' option If you are using more than one condition, but any, not necessarily all, can be true, then use 'Match any of the following'.
    example test:
    Using Account and folder specific Search method.
    I set it to search a particular folder.
    selected: 'Body' and 'Contains' and typed: "new
    click on 'Search' button
    It returned only one message.
    when I removed the quote mark so it only said: new (not "new)
    clicked on search and it returned several possibilites.
    So this worked, returning exactly as required.
    When I used the 'Global Search' on same folder typing: "new
    It returned a search only on : new
    Quick filter method also failed to recognise the " used before new.
    So in this instance of searching on: "new
    neither Global Search nor Quick filter returned the best result although the message required was included in the selection returned.
    The best method which worked as required was Using Account and folder specific Search method.
    You can search to return any emails with attachments using 'Account and folder specific Search' method.
    Quick Filter and Global filter will search on whether the word 'attachments' is in the eg: Body of email, but not necessarilly locate emails with attachments.
    Global search will search to include attachment filenames.
    Quick filter does not.
    As far as I'm aware, you cannot search the contents of an attachment.

  • RESTful Service Search Parameters

    Hello,
    I am using APEX 4.2.2 .. with Listener 2.0.3
    I want to expose  data in EMP table as RESTful Service with parameters:
    The source is:
    Source Type :SQL query .
    Format: JSON
    select * from emp where
    (:job IS NULL OR job = :job)
    and
    (:ename is null or ename = :ename)
    URI Template:
    employeesfeed/{job}/{ename}
    If I use this URL, it works fine...
    http://oraclesrv/real_estate/property/hr/employeesfeed/MANAGER/BLAKE
    and it gives:
    {"next":{"$ref":"http://oraclesrv/real_estate/property/hr/employeesfeed/MANAGER/BLAKE?page=1"},"items":[{"empno":7698,"ename":"BLAKE","job":"MANAGER","mgr":7839,"hiredate":"1981-04-30T20:00:00Z","sal":2850,"deptno":30}]}
    But, as you may notice from the Source logic, the "end user" should be able to retrieve all MANAGERS using this Link.
    http://oraclesrv/real_estate/property/hr/employeesfeed/MANAGER/null
    But, it gives:
    {"items":[]}
    So, How can I retrieve all Managers ?? ( using that Source ).
    Regards,

    The the four letters (n,u,l and l) at the end of your URL happen to be a string of length 4.
    Basically, you doing this comparison:
    'null' is null (which is false)
    If you want to keep that syntax, add
    or upper(:job) = 'NULL'
    MK

  • Exchange Search parameters

    Greetings, we have been asked to complete eDisciovery through a legal request. I am new to this process and have learn a lot about searching the complete system bases on words only, not just in subject or who from or who to, but any content.
    I have learned the difference of using opedrators OR and AND. But for word searches that are not separated by a Boolean operator, does the Exchange server assume it is like an AND operator?

    If you have a string of words together, Exchange will assume it is a phrase that needs to be found.  So "basic anomaly" would not find results with only "basic".  So not even an AND operator, since that would find an item
    where basic and anomaly were apart.

Maybe you are looking for

  • Memory leak using Oracle thin driver on wls6.1...

    Hi, I've been attempting to find a memory leak in an application that runs on WLS 6.1 SP2, on Solaris 8 and accessing an Oracle 9i db. We are using the Type 4 (Thin) driver and JProbe reports that hundreds of oracle.jdbc.* objects are left on the hea

  • I cannot reinstall iTunes on my PC

    I received an error message when I started my computer; now I cannot open iTunes.  I uninstalled it and tried to reinstall; however, I get this message: Service 'Apple Mobile Device' (Apple Mobile Device) failed to start. Verify that you have suffici

  • Can Customer Master changes to Vendor Master Automatic

    Hello Sir, We are implementing SAP for the General Insurance Company. Here ones the policy is generated from the customer. if the customer met with accident then that customer will be vendor.  Can Customer be vendor Automatic at the time of the payme

  • Need info about Augmented Reality Apps for SmartPhones

    Greetings, We're trying to see if CS5 could be used to create a SmartPhone AR application. (Augmented Reality) Is there an SDK we could use to ease the process ? It must work with iPhone, Android and Windows Phone 7. Thanks !

  • BI 7.0 system requirement

    Hello. I'm planning to upgrade of OS,DB and BI. I'm looking for official documents about system requirements of BI 7.0. but, I couldn't find it. I'd like to know if I have to choose 64bit OS and Server, and I should have to choose SQL Server 2000 or