Manuel,

I may be no help at all because I am not a CF guy. I am however,
a DB guy. The best way of handling this kind of thing is to do
it in the database with a stored procedure and not use a direct
call to the database.

Something like this for SQL Server...

CREATE PROCEDURE dbo.pSearch_lob_tab_CLOB
     @ClobSearch VARCHAR(200)
AS
BEGIN
     IF (CHARINDEX(';', @ClobSearch) = 0)
         SELECT *
         FROM lob_tab
         WHERE clob_content LIKE @ClobSearch
     ELSE
         SELECT 'Your search cannot include a ; character.' AS SystemMessage
END

Note that you will have to pass in a % at the beginning and end of
the variable @ClobSearch. Also notice that the IF wrapper will not
allow the SQL to execute if it contains a ;. This will help protect
a little for SQL Injection.

Robert


At 02:29 AM 12/12/2008, you wrote:
>Date: Thurs, Dec 11 2008 1:30 pm
>From: Manno
>
>
>I am having trouble output text string with the CLOB contraint.
>I enable the option in the admin, set the query param to recognize it
>but it gives me this error.
>If anyone has any idea on this subject i could use the help.
>Error
>inconsistent datatypes: expected - got CLOB
>
>
>SELECT *
>12 :     FROM   lob_tab
>13 :     Where clob_content = <cfqueryPARAM value = "#clob_content#"
>CFSQLType = "CF_SQL_CLOB">
>14 : </cfquery>
>
>Thanks
>Manuel

Robert Stewart
ProjecTools.com
713-371-9840 X1305 



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Houston ColdFusion 
Users' Group" discussion list.
To unsubscribe, send email to [email protected]
For more options, visit http://groups.google.com/group/houcfug?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to