Sorry, this is long but here's some more detail.  Thanks, Tony, for the suggestion but the data, when it is returned, is good.  I re-ftped the database over, thinking maybe some fields got corrupted, but no go.  I even re-ftped the database from the host back to my local drive and ran the searches against it locally again... and they worked.

Here's a little of my code.  Could this be due to differences in SQL versions between my machine and the server, causing the results to be interpreted differently?  Or am I misusing my form variables somehow and they're getting cached differently????  I'm stumped.

My search form has:
-search keywords (this works fine),
-a drop-down list returning type_select (I get 0 records returned if I choose anything; default is to show all and that works fine but then it's not generating any selection criteria in that case)
-radio buttons returning archived status (it works when archived = 0 but not when archived = 1)

Again this all works with good results when I run it locally, but not on the remote server.

<cfquery name="jobs" datasource="EAC">
  SELECT *
  FROM Jobs
  WHERE

<cfif #Form.type_select# eq 1>
  Job_Type_Health = 1 AND
</cfif>
<cfif #Form.type_select# eq 2>
  Job_Type_Cust_Service = 1 AND
</cfif>

<cfif #Form.keywords# is not "">
  (Job_Title LIKE '%#Form.keywords#%' OR Job_Description LIKE '%#Form.keywords#%') AND
</cfif>

<cfif #Form.rad_archived# eq 0>
  Archived = 0 AND
<cfelseif #Form.rad_archived# eq 1>
  Archived = 1 AND
</cfif>

0=0
ORDER BY Archived ASC, Entry_Date DESC
</cfquery>

Thanks-
-Amy Wilder

>if you are getting good records sometimes, this wont make sense.  if the
>records make no sense...
>
><shot in the dark>
>
>have you tried to rename it, something very off the wall, just
>to make sure its not the same name as another access db on the same
>server?
>
></shot in the dark>
>
>
>....tony
>
>Tony Weeg
>sr. web applications architect
>navtrak, inc.
>[EMAIL PROTECTED]
>410.548.2337
>www.navtrak.net
>
>-----Original Message-----
>From: Amy Wilder [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, May 25, 2004 11:48 PM
>To: CF-Talk
>Subject: Different cfquery results - local vs. hosted
>
>
>Hi,
>I'm fairly new to CF and I'm developing my first CF site that uses a web
>hosting package for the database/datasource.  When I developed my site
>and tested it locally using my copy of the Access database, it worked
>fine.  But when I ftp the Access database and my pages to the host and
>go through the app remotely, I get different results for my queries.
>Help meeee....
>
>Some searches work fine so I know it's connecting to the datasource.
>But some searches come up with zero records when I know the records are
>out there... could it be a timeout issue?  (unlikely given the small
>number of records and the quick response times I'm getting).  Any other
>ideas of where to even begin?  I don't know that my host would/could
>turn on debugging, though I might pursue that in the morning.  But if
>the SQL query is okay but the results are not, where to begin???
>
>Any and all help is greatly appreciated.
>
>-Amy Wilder
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to