|
Home > Archive > MS SQL Server > March 2006 > RE: The text, ntext, and image data types cannot be compared or sorted
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
RE: The text, ntext, and image data types cannot be compared or sorted
|
|
| John Bell 2006-03-05, 8:24 pm |
| Hi Nathon
Have you checked that the message is correct e.g you are comparing a text
column using'=' such as
CREATE TABLE #tmp ( col1 ntext )
INSERT INTO #tmp ( col1 ) SELECT 'A' UNION ALL SELECT 'B'
-- Error 306
SELECT * FROM #tmp
ORDER BY Col1
-- Error 402
SELECT * FROM #tmp
where col1 = 'A'
-- Error 402
SELECT * FROM #tmp
where col1 IN( 'A')
-- OK
SELECT * FROM #tmp
where col1 like 'A%'
DROP TABLE #tmp
John
"Nathon Jones" wrote:
> Does anyone know what this means?
> Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
>
> [Microsoft][ODBC SQL Server Driver][SQL Server]The text, ntext, and image
> data types cannot be compared or sorted, except when using IS NULL or LIKE
> operator.
>
> /checkout.asp, line 350
>
> Got us stumped.
> Thanks
> Nath.
>
>
>
| |
| Nathon Jones 2006-03-05, 8:24 pm |
| I'll be honest with you John, I am using a Dreamweaver Extension (WA_eCart)
to handle the INSERT to database, and I don't have a great knowledge of
MSSQL so I'm unable to truthfully answer your question.
The extension takes form data from a page on a different server, and then is
supposed to INSERT that data into our MSSQL database.
We don't understand the error and there are no mentions of this in the
extension support networks - oh, and they don't work Saturday's!
Thanks for trying to help. What exactly does this error mean though? That
we are trying to insert the wrong type of data into a field? We've double
checked that, and most of our fields are nvarchar.
Thanks.
Nath.
"John Bell" < jbellnewsposts@hotma
il.com> wrote in message
news:78FBC94B-F802-4ED3-9C67- 781787E394A3@microso
ft.com...[color=darkred]
> Hi Nathon
>
> Have you checked that the message is correct e.g you are comparing a text
> column using'=' such as
>
> CREATE TABLE #tmp ( col1 ntext )
>
> INSERT INTO #tmp ( col1 ) SELECT 'A' UNION ALL SELECT 'B'
>
> -- Error 306
> SELECT * FROM #tmp
> ORDER BY Col1
>
> -- Error 402
> SELECT * FROM #tmp
> where col1 = 'A'
>
> -- Error 402
> SELECT * FROM #tmp
> where col1 IN( 'A')
>
> -- OK
> SELECT * FROM #tmp
> where col1 like 'A%'
>
> DROP TABLE #tmp
>
> John
>
> "Nathon Jones" wrote:
>
|
|
|
|
|