Ask a Question related to Coldfusion Database Access, Design and Development.
-
Vampyr_Bytes #1
No default value / syntax error
Hi all,
I'm trying to run the following query on an access database -
<cfquery name="Warnings" datasource="Products">
SELECT WarningInfo
FROM tblWarnings
WHERE tblWarnings.WarningCode = tblWarningLink.WarningCode
AND tblItems.ItemCode = tblWarningLink.ItemCode
AND tblItems.ItemCode = <cfqueryparam value="#url.id#"
cfsqltype="cf_sql_integer">
</cfquery>
however, when it runs I get the following error -
Error Executing Database Query.
Parameter tblItems.ItemCode has no default value.
The error occurred in C:\CFusionMX7\wwwroot\Mother Earth's Goodies\Item.cfm:
line 13
11 : WHERE tblWarnings.WarningCode = tblWarningLink.WarningCode
12 : AND tblItems.ItemCode = tblWarningLink.ItemCode
13 : AND tblItems.ItemCode = <cfqueryparam value=#url.id#
cfsqltype="cf_sql_integer">
14 : </cfquery>
15 : <cfquery name="Properties" datasource="Products">
--------------------------------------------------------------------------------
SQL SELECT WarningInfo FROM tblWarnings WHERE tblWarnings.WarningCode =
tblWarningLink.WarningCode AND tblItems.ItemCode = tblWarningLink.ItemCode AND
tblItems.ItemCode = (param 1)
DATASOURCE Products
VENDORERRORCODE 3088
SQLSTATE
and when I run a test in the query builder I get "syntax error(missing
operator) in query."
any and all help will be greatly appreciated
Vampyr_Bytes Guest
-
Syntax error
I posted a question or two on this recently, and posts have been helpful. However, I have a new problem, and don't know what to do. To recap.... -
Syntax error?
Hi, I'm developing an ASP.NET web application with MySql 5. I have a little problem: if i create a stored procedure like this one: CREATE... -
error : syntax error at or near $1 for over select rows
This is the error i am getting when calling select * from cas_reset_qi_changedate('CAS','2003-02-03' ERROR: syntax error at or near "$1" at... -
syntax error ???
Hi, on login.php , we can see that : (...) $sql = "SELECT Login FROM logins WHERE Login='$fusername'"; $result = mysql_query($sql) or... -
SQL Syntax Error
Having some problems with my SQL statement syntax: Microsoft JET Database Engine (0x80040E14) Syntax error (missing operator) in query expression... -
mxstu #2
Re: No default value / syntax error
If you are joining multiple tables, you need to reference all of the tables in
your FROM clause. Something like this
--- NOT TESTED
SELECT tblWarnings.WarningInfo
FROM tblWarnings, tblItems, tblWarningLink
WHERE tblWarnings.WarningCode = tblWarningLink.WarningCode AND
tblItems.ItemCode = tblWarningLink.ItemCode AND
tblItems.ItemCode = <cfqueryparam value="#url.id#" cfsqltype="cf_sql_integer">
mxstu Guest
-
CF_Oracle #3
Re: No default value / syntax error
If you still have error after naming all tables as mxtu advised put at the top of your CF page <cfparam name="url.ID" default=0>.
CF_Oracle Guest



Reply With Quote

