Error selecting text from a SQL database

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: mageos (matt.dot.osborne_at_cox.dot.com)
Date: 12/23/04

  • Next message: Mike Epprecht \(SQL MVP\): "Re: Error selecting text from a SQL database"
    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


  • Next message: Mike Epprecht \(SQL MVP\): "Re: Error selecting text from a SQL database"

    Relevant Pages

    • Error selecting text from a SQL database
      ... I have an application that used an access database and I am currently ... databases but dies under SQL Server. ... settingValue is an ntext field and owner and setting are varchar fields. ...
      (microsoft.public.sqlserver)
    • Re: Migrating away from MS-Access
      ... Ive just stepped into a role to migrate an access database to VB.Net. ... At some stage we have to migrate the access backend to SQL Server. ... A dot-net front end with an MDB file back end is the worst of all worlds. ...
      (comp.databases.ms-access)
    • Re: tool to re-reference forms after usizing?
      ... Speed Ferret (which I hate to admit that I've never been able to get to ... tblCustomerAddress, remember that changing tblCustomer to something else ... >>> I am in the process of upsizing an access database to sql server. ...
      (microsoft.public.access.conversion)
    • Re: ODBC parameters and system resources
      ... Install MSDE or use an existing SQL Server. ... I connect to an Access database of about 500MB in size. ... there is the "Not enough space on temporary disk". ... What can a "System resource" be apart from disk space and RAM? ...
      (comp.databases.ms-access)
    • RE: ODBCDirect Workspace
      ... successfully ported my tables to SQL Server and have created an Access ... Are you using one Access database to work inside of another Access database? ... Set daoDbs = Nothing ... However if you are going to be using this query again to populate the combo ...
      (microsoft.public.access.modulesdaovba)