Thread: ODBC Error

ODBC Error

From
"Jillian Carroll"
Date:
When I insert content from my WYSIWYG editor (eWebEditPro by Ektron) I sometimes receive the following error.  I don't believe the problem to be ColdFusion related, as the problem cannot be replicated on MySQL (which I'd really rather not have to use).  I'm using Postgresql on RedHat.  The datatype is text, which I know is virtually unlimited.  Anybody have this happen before?  I've also posted the CFQUERY from action.cfm below this error.

Error Occurred While Processing Request

Error Diagnostic Information ODBC Error Code = 08S01 (Communication link

failure) Error while executing the query; Query string is too long The

error occurred while processing an element with a general identifier of

(CFQUERY), occupying document position (56:3) to (56:47) in the template

file /data/aliases/domain/sk/devel/admin/action.cfm. Date/Time: Tue Jun 18

17:20:49 2002 Browser: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

Remote Address: 142.165.207.43 HTTP Referrer:

http://www.domain.ca/devel/admin/edit.cfm

*** *** ***

  <CFQUERY NAME="q_gethtml" DATASOURCE="#DSN#">
   INSERT INTO wysiwyg_tbl (edit_title, edit_html, edit_category)
   VALUES ('#Trim(form.edit_title)#', '#Trim(form.myContent1)#', '#Trim(form.edit_category)#')
  </CFQUERY>

Re: ODBC Error

From
Tom Lane
Date:
"Jillian Carroll" <jillian@koskie.com> writes:
> failure) Error while executing the query; Query string is too long

I'd guess that you have an obsolete version of either the Postgres
server or the ODBC driver.   That error has been gone since circa
7.0.

            regards, tom lane

Re: ODBC Error

From
"Josh Berkus"
Date:
Jillian,

> When I insert content from my WYSIWYG editor (eWebEditPro by Ektron)
> I
> sometimes receive the following error.  I don't believe the problem
> to be
> ColdFusion related, as the problem cannot be replicated on MySQL
> (which I'd
> really rather not have to use).  I'm using Postgresql on RedHat.  The
> datatype is text, which I know is virtually unlimited.  Anybody have
> this
> happen before?  I've also posted the CFQUERY from action.cfm below
> this
> error.

No, it's ODBC related.  Most ODBC drivers regognize TEXT as
VARCHAR(1000 or 5000), and give you errors when you pass a longer
string.  Worse ODBC drivers have an absolute limit on the length of
query strings ... for example, ADO-ODBC for VB 6.0 cut you off at 8000
chars total, as I recall.

Remember that when the ODBC standard was written, several databases had
a length limit of *48 characters* on text fields.   So really long text
fields have been a chronic problem of legacy bugs.

What ODBC driver are you using?  Where did it come from?  What's your
client platform (NT or Linux?)   Figure out the specifics, and then
re-post your question to the mailing list for the PGAdmin project
(pgadmin.postgresql.org) who I believe are the current ODBC
maintainers.

Keep in mind that, if your ODBC client is supplied by ColdFusion,
  you'll have to take it up with them.

-Josh Berkus


Re: ODBC Error

From
AarniRuuhimäki / Megative Tmi / KYMI.com
Date:
Hi !

It could be driver issue.

Anyhow, we had similar error with really long text input. You have limited /
extended text input for 65 000 chars in your cf-admin ? ( You are using CF5
linux ? )

Or could be that - I remember seeing somewhere - if your query in pgsql by
default, which your input is part of, exceeds 16 k it won't go ?


BR,

aarni



On Wednesday 19 June 2002 05:06 pm, you wrote:
> When I insert content from my WYSIWYG editor (eWebEditPro by Ektron) I
> sometimes receive the following error.  I don't believe the problem to be
> ColdFusion related, as the problem cannot be replicated on MySQL (which I'd
> really rather not have to use).  I'm using Postgresql on RedHat.  The
> datatype is text, which I know is virtually unlimited.  Anybody have this
> happen before?  I've also posted the CFQUERY from action.cfm below this
> error.
> Error Occurred While Processing Request
>
> Error Diagnostic Information ODBC Error Code = 08S01 (Communication link
>
> failure) Error while executing the query; Query string is too long The
>
> error occurred while processing an element with a general identifier of
>
> (CFQUERY), occupying document position (56:3) to (56:47) in the template
>
> file /data/aliases/domain/sk/devel/admin/action.cfm. Date/Time: Tue Jun 18
>
> 17:20:49 2002 Browser: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
>
> Remote Address: 142.165.207.43 HTTP Referrer:
>
> http://www.domain.ca/devel/admin/edit.cfm
>
> *** *** ***
>
>   <CFQUERY NAME="q_gethtml" DATASOURCE="#DSN#">
>    INSERT INTO wysiwyg_tbl (edit_title, edit_html, edit_category)
>    VALUES ('#Trim(form.edit_title)#', '#Trim(form.myContent1)#',
> '#Trim(form.edit_category)#')
>   </CFQUERY>