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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web Dev: CFML: SELECT from WHERE syntax ?

Status
Not open for further replies.

ColdFuse

Programmer
Joined
Jun 13, 2006
Messages
5
Location
US
Tek related to this problem:
MS access 2003
CFMX 6.1 (jrun mapped to Apache 2.0.x)
WinXP

you're probably thinking maybe it's got something to do w/ the server mapping-- but, i'm using the same setup on a Windows Server 2003, w/ the same result-- as the error appears to have origin at Access ODBC db.
but before i talk you out of it, here's the markup from the ColdFusion document:
Code:
<cfquery name="getschools" datasource="mod">
   SELECT schools.school_name
   FROM schools
   WHERE schools.key = '#session.school_id#'
</cfquery>

<cfset variables.school_name="#getschools.school_name#">
<cfset session.school_name="#getschools.school_name#">

and the error i'm getting is like so:
(please see URL for 'attachment')

what do you recommend? is there something else i could show you to help you to help me?

thank you!!
 
update:

i should have mentioned that i'm using Dreamweaver8 to manage this project...

i modified the code, through several trial and error attempts, via the IDE's "Recordset" interface-- just to see if Macromedia might have already put the proper code in there for me, but it's giving me errors still, and as i manually modified the operator to "ColdFusion style" "EQ" (or NOT EQ) instead of = (or !=), i managed to make the error change (oh, and also modified the SQL to table.field_name , instead of table.key)

new SQL:

<cfquery
SELECT schools.school_name
FROM schools
WHERE schools.school_id eq '#session.school_id#'
</cfquery>

have a look if you'd be so kind.

(update2)
and just upon trying again (about 45 mins later), i got yet another error-- which may just be an XP thing 'cause i've got a lot of windows open (even thought we've got 768RAM and a 1.4Ghz Athlon processor-- she's slow... and i've got Spyware Dr and all those goodies-- Ewido recently cleaned, etc) -- or maybe my SQL is confusing the dbms?

(btw-- my server is intermittent tonight. maybe host doing maintenance, or maybe host is ripping me off! ;)
 
btw-- i realize the opening tag isn't complete above. its not like that in my 'real' code.

sorry-- i can't figure out how to edit my other posts (if someone would be so kind as to indicate... in the meantime, i'll check the faq, of course)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top