Hi,
i have a query regarding where it has involvement of database and Qt. So here i go
I have created a table with some columns which stores different data types.
I need to read them and write to a binary file directly from database without having any intermediate structures.I need to write in hex format in to binary file. Say if i read a value from db as -80 which i stored as an int in database. i need to write it as 4 byte hex value to a file.Here is a part of code
Qt Code:
while(query.next()) { for(int i=1;i<20;i++){ byteArray.append(query.value(i)); qDebug() << "Record Read :" <<byteArray.at(i); } } output_file << byteArray.toHex();To copy to clipboard, switch view to plain text mode
Please let me know ur thots.Thaks in Advance
Regards
Bala B
Bookmarks