Oops -- my hand too fast on the send button -- you had the "connection"
defined but I clipped it out ... Sorry ...


On 11/13/02 3:48 PM, "Jann VanOver" <[EMAIL PROTECTED]> wrote:

> What's not working for you?  Do you get an error statement?
> 
> Are you sure that parameter "name" exists?
> 
> Where do you get the connection, "connection" ?
> 
> One style note ... It's good to avoid variable names that could possibly be
> a reserved word anywhere along the line.  I suggest changing String query to
> String myQuery, or String nameQuery or something less generic than "query"
> 
> 
> On 11/11/02 2:28 PM, "Jenkins, Chris" <[EMAIL PROTECTED]>
> wrote:
> 
>> I'm aware this is off topic, but I couldn't' find the answer anywhere and
>> this
>> list has always helped me.  I'm trying to run a wildcard search using a
>> prepared statement, but I'm having zero luck. I've include the statement
>> below.  Any help is greatly appreciated.  Note, the code below doesn't
>> include
>> a wildcard because all my attempt to use a "%" has failed.
>> 
>> <%
>> 
> ..
>> String query = "SELECT * FROM events WHERE name like ?";
>> java.sql.PreparedStatement statement = connection.prepareStatement(query);
>> statement.setString(1,request.getParameter("name"));
>> java.sql.ResultSet RS = statement.executeQuery();
>> %>
>> 
>> If it matters anything, I'm running this on CFMX.
>> 
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to