Aloha, I am attempting to extract graphics as described and discussed above for a friend with a database in Paradox 5. The examples above helped me tremendously and I'm making some progress but it doesn't seem to be working completely.
The table I have contains 4596 elements. The column with the graphics is a BLOB, and not every recorded contains an element.
When I run a script like the final one shown here (modified of course to my database), it extracts exactly 37 files and then stops. It is not the first 37 records, either. None of them has a graphic in the BLOB column, so I get 37 files of 0k.
I've used tc.home() to make sure TCursor is set to the first record. I've repaired the table and also have tried this on a different machine, same exact results. I've also used .isBlank() to have the script bypass empty records, but then I get no files exported.
Can anyone tell me what may be causing this script to export only those 37 records?
Code:
var
grImage Graphic
grObjName String
tcHandle TCursor
endVar
tcHandle.open(":ProjectsDir:Objects.db")
tcHandle.home() ; maybe not necessary but couldn't hurt
scan tcHandle :
if NOT grImage.isblank() then
grImage = tcHandle.Photograph
grObjName = tcHandle.ID
grImage.writeToFile(":ExtractedImages:" + grObjName + ".bmp")
endIf
endScan
tcHandle.close()
Mahalo (thanks) in advance.