@dbcommand data type is unsupported

hi all: the formula is:

r := @DbCommand(“ODBC”;“License”; userid; password; “SELECT CallInforID FROM CallInfor WHERE KNO=‘12345’”);

@SetField(ServiceRecords; r)


the database is sql server, and KNO’s data type is nvarchar, but when i run it, it error" @Db function failed because the data type of the requested column is unsupported

instead when i run @DbCommand(“ODBC”;“License”; userid; password; “SELECT CallInforID FROM CallInfor WHERE KNO=12345”); it errors"Could not execute @db function

why they happen? thanks in advance!

Subject: @dbcommand data type is unsupported

seems to be a problem with CallInforID

Subject: @dbcommand data type is unsupported

A bit late, but I will reply to this as I just had this error and figured out.

The SQL response needs to be returned as a data type char. Some nvarchar columns will work, where others won’t. To fix your statement do:

SELECT CAST(CallInforID AS char(255)) FROM CallInfor WHERE KNO=‘12345’

This post: http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/e999ce794927e7758525710e005ed597?OpenDocument

Seems to indicate for CAST you need to give the column a name ie. CAST(CallInforID AS char(255)) As ‘Column’.

But it still works without it…