QTableview & QSqlQueryModel 读取修改MSSQL 中 binary 的字段
如题,
我想用QTableview & QSqlQueryModel 来读取修改MSSQL 中 binary 的字段 passwd等,SQL表如下:我该怎么做?主要是QString和binary之间的转换不清楚……
CREATE TABLE [dbo].[users] (
[ID] [int] NOT NULL ,
[name] [varchar] (32) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[passwd] [binary] (16) NOT NULL ,
[Prompt] [varchar] (32) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[answer] [varchar] (32) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[truename] [varchar] (32) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[idnumber] [varchar] (32) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[email] [varchar] (64) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[mobilenumber] [varchar] (32) COLLATE Chinese_PRC_CI_AS NULL ,
[province] [varchar] (32) COLLATE Chinese_PRC_CI_AS NULL ,
[city] [varchar] (32) COLLATE Chinese_PRC_CI_AS NULL ,
[phonenumber] [varchar] (32) COLLATE Chinese_PRC_CI_AS NULL ,
[address] [varchar] (64) COLLATE Chinese_PRC_CI_AS NULL ,
[postalcode] [varchar] (8) COLLATE Chinese_PRC_CI_AS NULL ,
[gender] [int] NULL ,
[birthday] [datetime] NULL ,
[creatime] [datetime] NOT NULL ,
[qq] [varchar] (32) COLLATE Chinese_PRC_CI_AS NULL ,
[passwd2] [binary] (16) NULL
) ON [PRIMARY]
GO