[Kexi] Importing Images (BLOB data)
genomicist
longcrossing at yahoo.com
Fri Dec 14 11:16:18 CET 2007
In review,
I read the tutorial here:
http://www.kdedevelopers.org/node/2163
and asked how to import images in batches
Jaroslaw Staniek provides a nice answer here:
http://kexi-project.org/wiki/wiki/index.php?HOWTOs%2FDatabase%20Handling
This advice mostly worked for me, but here are few comments that might help
other folks trying to do the same thing.
First here is a perl script to convert a binary file to a hex string, which
is needed to create the BLOB data:
sub Bin2HEX {
my $bin_file = shift;
open (BIN, "$bin_file") or die "Could not open $bin_file\n\n";
binmode BIN;
my $bin;
while ( read (BIN, $bin, 1 ) and printf("%02X", ord($bin))){};
close BIN;
}
Lastly, when using images in forms, if I declare an image box read-only, no
image is displayed, and the database crashes when I close the form (signal
6). I'm using Kexi 1.1.0, so maybe an update will help.
Otherwise it works well so far.
Thanks,
Andrew Hufton
--
View this message in context: http://www.nabble.com/Importing-Images-%28BLOB-data%29-tp14255116p14333181.html
Sent from the Kexi General mailing list archive at Nabble.com.
More information about the Kexi
mailing list