Error selecting text from a SQL database
From: mageos (matt.dot.osborne_at_cox.dot.com)
Date: 12/23/04
- Previous message: Rod at MHC: "SQL Disconnects Intermittenly During Day"
- Next in thread: Mike Epprecht \(SQL MVP\): "Re: Error selecting text from a SQL database"
- Reply: Mike Epprecht \(SQL MVP\): "Re: Error selecting text from a SQL database"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 23 Dec 2004 20:49:31 GMT
Hello,
I have an application that used an access database and I am currently
migrating to SQL Server. The software is designed to use Odbc object
found in the .Net framework version 1.1. I have a simple select
statement that is driving me nuts. It works fine with the Access
databases but dies under SQL Server.
The statement is:
SELECT
settingValue
FROM
tblSettings
WHERE ( owner=@owner and setting=@setting )
settingValue is an ntext field and owner and setting are varchar fields.
When I try to execute the query I get an error:
ERROR [42000][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.
There are no indexes on any of the fields so I cannot figure out what
the problem is.
Mageos
- Previous message: Rod at MHC: "SQL Disconnects Intermittenly During Day"
- Next in thread: Mike Epprecht \(SQL MVP\): "Re: Error selecting text from a SQL database"
- Reply: Mike Epprecht \(SQL MVP\): "Re: Error selecting text from a SQL database"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|