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
}
[]
更多精彩
赞助商链接