You can fancy it up with filebrowser, or place within a scan for multiple images, but the below is the bottom basics.
Code:
var
tc tcursor
gr graphic
endvar
if not tc.open(":alias:tablename.db") then
errorshow()
return
endif
tc.edit()
if gr.readfromfile("drive:\\fullpath\\image.jpg") then
tc.insertrecord()
tc."graphic_fieldname"=gr
try
tc.unlockrecord()
onfail
errorshow()
tc.canceledit()
endtry
endif
tc.endedit()
tc.close()
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.