maybe try a select box, that's what we normally use for such situations.

-----Original Message-----
From: Dave Hannum [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2001 8:56 AM
To: CF-Talk
Subject: Passing String In Form vs. URL


Hello,
I've got an interesting one.  I have a table with a column of Account Codes
values that are varied like so:

(None)
00 01 3513
09 18 4006
10 20 504618
9410
etc . . .

If I return all of the rows in the database, and make each record a link
with AcctCode=#AcctCode# and then query the database to bring back the
record

ex:  WHERE AcctCode = '#URL.AcctCode#'

it works fine.  However, the table contains about 6400 rows, so I don't want
to return all 6400 to choose from.  Thus, I want to use a form. However, if
I provide a form field where a user can type in a number (e.g. 00 01 3513)
it always returns 0 records:

ex:  WHERE AcctCode = '#FORM.AcctCode#'
        OR
ex:  WHERE AcctCode LIKE '%#FORM.AcctCode#%'

Now, if they just put 00 or 01 or just 3513 into the field, it will return
any row with that combination.  So, the problem seems to be the spaces in
the string when passed in a form field.  How do I overcome this, because the
application calls for the user to just be able to enter either the complete
Account Code if they know it or, say the first four digits (i.e. 00 01) if
they know them and get all that match.

Thanks,
Dave


===============================
David R Hannum
Ohio University
Web Analyst/Programmer
(740) 597-2524
[EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to