WEB开发网
开发学院手机开发Symbian 开发 symbian 数据库字段长度 阅读

symbian 数据库字段长度

 2010-05-31 19:42:00 来源:WEB开发网   
核心提示:TDbCol(const TDesC& aName,TDbColType aType);TDbCol(const TDesC& aName,TDbColType aType,TInt aMaxLength);EDbColText : 默认长度 50, 自定义长度 aMaxLengthEDbColLongText :基本

TDbCol(const TDesC& aName,TDbColType aType);

TDbCol(const TDesC& aName,TDbColType aType,TInt aMaxLength);

EDbColText : 默认长度 50, 自定义长度 aMaxLength

EDbColLongText :基本不限制长度,但需要用流读写,如:

void CDBColStream::WriteStream( RDbTable& atable, TDbColNo aCol, const TDesC& adescription )

{

RDbColWriteStream writeStream;

writeStream.OpenLC(atable,aCol);

writeStream.WriteL(adescription);

writeStream.Close();

CleanupStack::Pop();

}

void CDBColStream::ReadStream( RDbTable& atable, TDbColNo aCol, HBufC* description )

{

TInt length = atable.ColLength(aCol);

RDbColReadStream readStream;

readStream.OpenLC(atable,aCol);

TPtr16 temp(description->Des());

readStream.ReadL(temp,length);

readStream.Close();

CleanupStack::Pop(); //readStream

}

Tags:symbian 数据库 字段

编辑录入:coldstar [复制链接] [打 印]
赞助商链接