数据库中对应的属性类型是float型。 在QT中定义 float a; bindValue(":r",a);报错,显示varbinary与float不兼容,SQL Server未能准备语句。 但是直接把a改成一个浮点数如2.3 就能成功执行。