There is stored procedure on MS SQL 2005:
Qt Code:
  1. ALTER procedure [dbo].[fp_test]
  2. (
  3. --@Number int out
  4. @Value varchar(50) out
  5. )
  6. as
  7. --select @Number = 777
  8. select @Value = 'test string'
To copy to clipboard, switch view to plain text mode 

and there is client code:

Qt Code:
  1. QSqlQuery query;
  2. //query.setForwardOnly(true);
  3. query.prepare("{CALL dbo.fp_test(?)}");
  4. //query.bindValue("Number",n,QSql::Out);
  5. query.bindValue("Value", strValue,QSql::Out);
  6. if (!query.exec()) return 1;
  7. //n = query.boundValue("Number").toInt();
  8. strValue = query.boundValue("Value").toString();
To copy to clipboard, switch view to plain text mode 

On Windows XP this code works successfully, but on Ubuntu 9.10 query.exec() returns false:
QODBCResult::exec: unable to bind variable: " [FreeTDS][SQL Server]Invalid data type"

For integer parameters this code works successfully on both systems (variable n == 777).
Then there is problem with varchar parameters only.

Can help me ?