LyndonOHRC
Programmer
I must be missing something simple, this apostrophe issue is getting the best of me...
I have an Access table of county names, one of them is O'Brien.
After reading all that I can find I've tried all of these queries but never get a record back. Please help I'm obviously confused.
I tried all three of these and I get zero records every time:
<code>
<cfquery name="GetTownshipDirection" datasource="SCRegistry">
Select id
From TownshipDirection
Where County=<cfqueryparam value="#PreserveSingleQuotes(GetCounties.countyname)#" cfsqltype="CF_SQL_VARCHAR">
</cfquery>
<cfquery name="GetTownshipDirection" datasource="SCRegistry">
Select id
From TownshipDirection
Where County=<cfqueryparam value="#GetCounties.countyname#" cfsqltype="CF_SQL_VARCHAR">
</cfquery>
<cfquery name="GetTownshipDirection" datasource="SCRegistry">
Select id
From TownshipDirection
Where County='#GetCounties.countyname#'
</cfquery>
</code>
Lyndon
---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
I have an Access table of county names, one of them is O'Brien.
After reading all that I can find I've tried all of these queries but never get a record back. Please help I'm obviously confused.
I tried all three of these and I get zero records every time:
<code>
<cfquery name="GetTownshipDirection" datasource="SCRegistry">
Select id
From TownshipDirection
Where County=<cfqueryparam value="#PreserveSingleQuotes(GetCounties.countyname)#" cfsqltype="CF_SQL_VARCHAR">
</cfquery>
<cfquery name="GetTownshipDirection" datasource="SCRegistry">
Select id
From TownshipDirection
Where County=<cfqueryparam value="#GetCounties.countyname#" cfsqltype="CF_SQL_VARCHAR">
</cfquery>
<cfquery name="GetTownshipDirection" datasource="SCRegistry">
Select id
From TownshipDirection
Where County='#GetCounties.countyname#'
</cfquery>
</code>
Lyndon
---People Remember about 10% of what you say ---They never forget how you made them feel. Covey