Post by Alina RusoMy customers would like to scan in some images. This is easily done
currently by cutting and pasting into an OLE field. The problem is
they're stored in the DBT with a 2 GB limit and I have not had great
success with reliability in dbts. Can someone offer a better
methodology? I was thinking something like just storing in a data field
the name of the image and running it. Would be grateful for some ideas
here
You have answered your own question. <g> Keep all the scanned images in a
subdirectory (or a set of subdirectories that incorporate the date scanned
in the names) and simply store the filename, with its full path, in a
field. No DBT required.
The little example below may give you enough to get going.
Mervyn.
******* Start of example program ********
if not file( "mbphotos.dbf" )
create table mbphotos (photo char(60))
aFiles = new Array()
nFiles = aFiles.dir("c:\duflp\examples\*.*jpg")
use mbphotos
for n = 1 to nFiles
append blank
replace photo with "c:\duflp\examples\"+aFiles[n,1]
endfor
use
endif
** END HEADER -- do not remove this line
//
// Generated on 2008/09/29
//
parameter bModal
local f
f = new _showimageForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class _showimageForm of FORM
with (this)
height = 16.0
left = 52.4286
top = 5.1364
width = 40.0
text = ""
endwith
this.MBPHOTOS1 = new QUERY()
this.MBPHOTOS1.parent = this
with (this.MBPHOTOS1)
left = 8.0
top = 14.5
sql = 'select * from "mbphotos.DBF"'
active = true
endwith
this.IMAGE1 = new IMAGE(this)
with (this.IMAGE1)
height = 8.5
left = 3.0
top = 1.0
width = 33.0
endwith
this.LISTBOX1 = new LISTBOX(this)
with (this.LISTBOX1)
onSelChange = class::LISTBOX1_ONSELCHANGE
height = 4.0
left = 6.0
top = 11.0
width = 29.0
id = 103
dataSource = form.mbphotos1.rowset.fields["photo"]
endwith
this.rowset = this.mbphotos1.rowset
function LISTBOX1_onSelChange
form.image1.dataSource = "FILENAME "+this.value
return
endclass
********** End of Example code *****