On 25-02-2011 23:29, Massimo Di Pierro wrote:
> it is odd that mssql cannot compare a varchar with a text. How does
> your dal query look like?
this is the resulting sql query,
which looks rather well to me
("SELECT Field_Ex.id, Field_Ex.Tabel, Field_Ex.Field, Field_Ex.Type, 
Field_Ex.Validation,
Field_Ex.Choices, Field_Ex.Description FROM Field_Ex WHERE 
Field_Ex.Tabel='Patient';",)
> On Feb 25, 4:22 pm, Stef Mientki <[email protected]> wrote:
>> hello,
>>
>> How should I test a text-type field in a mssql database
>>
>>     Query = DB_Mod.Field_Ex.Tabel == '%s' % ( Name )
>>
>> where the field "Tabel" is a text-type field,
>> gives the following error.
>>
>> ProgrammingError: ('42000', '[42000] [Microsoft][ODBC SQL Server Driver][SQL 
>> Server]
>> The data types text and varchar are incompatible in the equal to operator. 
>> (402) (SQLExecDirectW)')
>>
>> Changing the type to "string" seems to work ok.
>>
>> thanks,
>> Stef Mientki

Reply via email to