Page 1 of 1

Export BLOB to be SQLite compatible

Posted: Tue 09 Feb 2016 09:47
by m227
Dear Sirs,
I'd like to export some data to SQL file with TMyDump to be able to import it with TLiteDump later. One of my field is a blob field (with 32 bytes).
Unfortunately neither of two ways with HexBlob true or false does not work. One of then produces a value like: 0x14050944092349222a... which cannot be imported as it appears as too long value. Second one contains inaccessible characters and is exported as NULL value to SQL.

The best would be format x'1405094409.....' which is widely accepted by SQLite. I tried to achieve this format with query as below but I failed.
SELECT CONCAT("x",0x27,HEX(params),0x27)
- this is embraced with apostrophes and internal apostrophes are slashed '\'. Do you have any hint?

I d'like to stay with SQL text file to be able to send it through FTP to another PC.

Re: Export BLOB to be SQLite compatible

Posted: Tue 23 Feb 2016 11:41
by ViktorV
You can use the TCRBatchMove component, that allows to migrate data between different datasets. See more details about it in the documentation: https://www.devart.com/unidac/docs/?dev ... chmove.htm
The TMyDump and TLiteDump components allow save and restore data according to specificities of a certain DBMS (MySQL server and SQLite respectively). We can't change this behavior of MyDAC, since such a modification will break functionality at all existing users' side. You can buy MyDAC Professional Edition with source code - and we will tell you how to modify this behavior manually.