How to store Long Binary Data

Login to reply to this topic.
Wed, 2006-02-15 15:05
Joined: 2005-07-25
Forum posts: 31
Dear All,

I am in delima weather the symbian sql (RdbNamedDatabase) supports to store the long binary data in to the data base file or not ?


I am not able to append the Long binary  data into the
Sql Statement,

Please let me know how to Append


Regards
Ranjeet

Wed, 2006-02-15 17:40
Joined: 2004-06-08
Forum posts: 148
Re: How to store Long Binary Data
      RDbTable table;
      TInt err = table.Open(iDataBase, KDBWrapperTable, table.EUpdatable);
      User::LeaveIfError(err);

      CDbColSet* aColSet = table.ColSetL();
      CleanupStack::PushL(aColSet);

      table.Reset();
      table.InsertL();
      RDbColWriteStream writeStream;
      writeStream.OpenLC(table, aColSet->ColNo(K_BLOB_COL));
      writeStream.WriteL(strBuff, (int)strSize);
      writeStream.Close();
      CleanupStack::Pop();      
      table.SetColL(aColSet->ColNo(K_FLAG_COL), flag);
      table.PutL();    // Complete changes (the insertion)
      table.Close();

Enjoy:)
  • Login to reply to this topic.