Hi,
I have Paradox 11 installed, and I'm trying to extract some pictures from a table. The pictures are graphic type. I'm very new at ObjectPAL so from the research that I made so far I came up with this code:
method run ( var eventInfo Event )
var
tc tcursor
img graphic
cnt number
endvar
cnt = 0
if tc.open("C:\\pathtoDB\\Images.db") then
scan tc :
cnt = cnt + 1
tc.fieldValue("ImageField",img)
img.writeToFile("C:\\pathtoimages\\IMAGE_" + String(cnt) + ".jpg")
endscan
tc.close()
endif
endmethod
But I get this error:
"You have tried to use an unassigned variable. A variable must be assigned a value before you can use it."
Any ideas of what could be wrong?
Any help is greatly appreciated.
Thanks,
Lidia
I have Paradox 11 installed, and I'm trying to extract some pictures from a table. The pictures are graphic type. I'm very new at ObjectPAL so from the research that I made so far I came up with this code:
method run ( var eventInfo Event )
var
tc tcursor
img graphic
cnt number
endvar
cnt = 0
if tc.open("C:\\pathtoDB\\Images.db") then
scan tc :
cnt = cnt + 1
tc.fieldValue("ImageField",img)
img.writeToFile("C:\\pathtoimages\\IMAGE_" + String(cnt) + ".jpg")
endscan
tc.close()
endif
endmethod
But I get this error:
"You have tried to use an unassigned variable. A variable must be assigned a value before you can use it."
Any ideas of what could be wrong?
Any help is greatly appreciated.
Thanks,
Lidia