Ask a Question related to Coldfusion Database Access, Design and Development.
-
moonroach1 #1
CFQUERY problem
I am passing three values from a form to a search application, miles, zip, and
day. I want to test for database entries in which the day's field is not null
and the zip value is contained within one of three fields (5miles, 10miles,
25miles) which are text strings of all zip codes within a certain mileage
radius of a field called ZipCode. My CFQUERY:
<CFQUERY DATASOURCE="DATA" NAME="SearchResults">
SELECT *
FROM Places
WHERE (#day# IS NOT NULL) AND (#miles#miles LIKE '%#zip#%')
</CFQUERY>
passes all the correct values into the .cfm module, but produces the following
error message:
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft
Access Driver] Syntax error (missing operator) in query expression '(Thursday
IS NOT NULL) AND (5miles LIKE '%08610%')'.
Any suggestions?
moonroach1 Guest
-
cfquery bug...still?
Hi, I have ColdFusion MX7,0,0,91690. I am trying to utilize the attached code. I am passing the query (it's easier for my implementation) in a... -
unusual cfquery problem
This is an unusual problem. I am attempting to populate a grid from a query ("rec_count2") which has a "where" variable based the tab selected... -
double single quote problem in cfquery
Hi, i've this problem with ColdFusion MX 6.1 Updater and MX 7 If i try to insert a text containing a single quote (for example TEST') all works... -
<cfquery> syntax problem
Guys can someone tell me whats wrong with the line I have put in bold? Im trying to run this query but I get an error telling me the syntax is wrong... -
Javascript and CFquery problem
Hi guys, im hoping you can help. Im currently working on a page that contains a single drop down list that is dynamically populated from the... -
mxstu #2
Re: CFQUERY problem
Guessing here, but it is probably the mileage radius columns. Because those
column names begin with a number, the database probably sees the number "5"
and tries to treat the column name as if it were a numeric value (ex. 5 + 2)
rather than a column name. Try changing the name so that it does not start
with a number: Radius5Miles, Radius10Miles, etc. I not too sure about the
rest of the table design ...
mxstu Guest
-
Ville M. #3
CFQUERY problem
Hi everyone.
I have a problem when I try to use Autodesk MapGuide LiteView or -"- -"-
Author to
use an example file "Sample_World.mwf"'. Exactly the problem comes out when
I'm asking the "REPORT" for
"capitals" from database which Cold Fusion can't find. Database is called
"Sample_World.cfm".
Linking URL's to file are assetted correctly in MapGuide Author and so on....
You can see the error announcement below which comes out when I'm asking the
"REPORT":
Welcome to the sample world data set for Autodesk MapGuide.
--------------------------------------------------------------------------------
Error Occurred While Processing Request
Error Diagnostic Information
ODBC Error Code = IM002 (Data source not found and no default driver specified)
[Microsoft][ODBC Driver Manager] Data source 'SAMPLE_WORLD' not found and no
default driver specified
Hint: In order to use ODBC data sources with Cold Fusion you must create the
data source using the Data Sources page of the Cold Fusion Administrator. In
addition, if you are running under Windows NT you must make sure that the Data
Source is created as a System DSN in order for it to be available to ColdFusion.
The error occurred while processing an element with a general identifier of
(CFQUERY), occupying document position (10:1) to (10:69).
Date/Time: 07/19/05 14:53:55
Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)
Remote Address: MyServerIPaddress
Because of the security reasons, I don't have DNS service in my server and
when I checked:
"data source using the Data Sources page of the Cold Fusion Administrator", I
could find problems in local server proberties
<=> SQL Server, but I think that isn't maybe so big problem, because I use
Cold Fusion and other programs only locally..???
As the error announcement said: CFQUERY error... So the problem must be in
Cold Fusion software or it's setup's or
something.. I have used these programs for a very short time and I would
really appreciate Your help.
These are the programs I use:
* Win NT
* Cold Fusion Server 4.5
* Allaire JRun 2.3.3
* MapGuide 5 (and some other MapGuide programs, but expecially:)
* MapGuide Author (and)
* MapGuide LiteView
Please, help me to solve this problem.
Ville
Ville M. Guest
-
Ville M. #4
Re: CFQUERY problem
I solved the problem. I able to associate the database to the example file with
Cold Fusion Administrator (Sample_World.mdb). Database was under
MapGuideServer5 -file, so I didn't recognize it before..
All this was new to me and I'm glad that I could solve the problem.
Ville
Ville M. Guest
-
BiSaisei #5
Re: cfquery problem
Might another query in another thread execute in between the insert and the
select statements, leaving me with the wrong @@IDENTITY? Is this possible
within a single cfquery?
Would using cftransaction be useful / necessary?
Also, the SET NOCOUNT ON line is to prevent the database server from saying:
"N rows sere affected."
BiSaisei Guest



Reply With Quote

