I'm trying to read a Tif file, and save it to a record on the database
I'm inserting a record into a table, and after the insert / commit
I'm trying to the varbinary(max) column - doc_image
with the blob that it read from the file.
It just seems to be hanging
do you see anything that I'm missing?
fh = fileopen(save_path, StreamMode!) | ||
messagebox('fileopen', string(fh)) | ||
if fh <> -1 then | ||
read_ret = FileReadEx(fh, image_blob) | ||
messagebox('error',string(read_ret)) | ||
Fileclose(fh) | ||
l _row = dw_docs.insertrow(0) | ||
dw_docs.setitem(l_row,"pool_no",mpool_no) | ||
dw_docs.setitem(l_row,"part_no",mpart_no) | ||
dw_docs.setitem(l_row,"doc_date",today()) | ||
dw_docs.setitem(l_row,"doc_type",doc_type) | ||
dw_docs.setitem(l_row,"doc_path",save_path) | ||
dw_docs.setitem(l_row,"ancil_docs_doc_number",doc_number) | ||
dw_docs.update() | ||
commit; | ||
curr_date = today(); | ||
select max(doc_id) into :current_id from ancil_docs where pool_no = :mpool_no and part_no = :mpart_no; | ||
messagebox('error final',string(current_id)); | ||
updateblob ancil_docs set doc_image = :image_blob where doc_id = :current_id using SQLCA; | ||
commit; | ||
else | ||
messagebox('error','error opening file') | ||
end if |