Each master! Urgent!!!!
I have a named photo, field as follows: student_id, name, photo_id (photo number, automatic accumulation), photo (Bolb), want to add the photo in the data window object stu_photo fields, and add in the data window dw_1, show pictures, how to implement, 300 points to solve the detailed code!
CodePudding user response:
Add easy, showed relatively trouble
CodePudding user response:
Need to remove photos, save to a local file, and then, according to add a STRING type in datawindow pseudo fields, the content of this field is the path of the temporary file, and then will display as picture can be selected in the datawindow
CodePudding user response:
No blob data window, cannot directly access, according to the second floor of the method
CodePudding user response:
Do not understand, ask everybody to help, get a detailed code!
CodePudding user response:
refer to the second floor elingsoft response: need to remove photos, save to a local file, and then, according to add a STRING type in datawindow pseudo fields, the content of this field is the path of the temporary file, and then will display as picture can be selected in the datawindow CodePudding user response:
My resources have saved about figure display, please download the reference CodePudding user response:
http://download.csdn.net/source/476206 http://download.csdn.net/source/476206 CodePudding user response:
Blob ib_blob Selectblob photo into: ib_blob from table where conditions Then keep ib_blob local image, assuming that picture named 1. The BMP Dw_1. Object. P_1. The filename=1. BMP CodePudding user response:
With data through the database of the ole object can be CodePudding user response:
Old man and the sea is very detailed answer, the key is to do, don't think hard, don't begin, more try, no problem CodePudding user response:
refer to the second floor elingsoft response: need to remove photos, save to a local file, and then, according to add a STRING type in datawindow pseudo fields, the content of this field is the path of the temporary file, and then will display as picture can be selected in the datawindow This is the fastest the most intelligent CodePudding user response:
Basic is the second floor, when I do get a md5 value stored images, generate temporary use md5 value when naming images, if there is a same name will no longer generate temporary files, the temporary files are deleted before application exit CodePudding user response:
refer to 12 floor yangjinok reply: basic is the second floor, when I was doing by the way, take a md5 value stored images, generate temporary use md5 value when naming images, if there is a same name will no longer generate temporary files, the temporary files are deleted before application exit Upstairs is trying to image encryption, or want to touch the file with the same, does not generate! CodePudding user response:
Read from the database to the file SelectBlob fphoto Into: lbb_photo From t_hrempl + condition If IsNull (lbb_photo) Then Return 1 If the Mod (Len (lbb_photo), 32765) & lt;> 0 Then Li_multiple=Round (Len (lbb_photo)/32765, 0) + 1 The Else Li_multiple=Len (lbb_photo)/32765 End the If Li_filehandle=FileOpen (gs_sysrunpath + "/BMP/f # & amp; @ BMP. @ @ @ "streammode! The Write! , lockwrite! The Replace! If li_filehandle=1 Then The Return - 1 End the If //deposited in the temporary file For I=1 To li_multiple Lbb_photoread=BlobMid (lbb_photo, (I - 1) * 32765 + 1, 32765) If FileWrite (li_filehandle lbb_photoread)=1 Then The Return - 1 End the If Next FileClose (li_filehandle) If dw_2. Object. P_photo. Filename & lt;> Gs_sysrunpath + "/BMP/f # & amp; @ BMP. @ @ @ "Then Dw_2. Object. P_photo. Filename=gs_sysrunpath + "/BMP/f # & amp; @ BMP. @ @ @ "End the If Return 0 Save the updated Ls_pfilename=' Lbb_photo=Blob (') Ls_pfilename=tab_1. Tabpage_1. Dw_2. Object. P_photo. Filename If ls_pfilename=gs_sysrunpath + "/BMP/f # & amp; @ BMP. @ @ @ "Then Return 1 Ll_filelength=FileLength (ls_pfilename) Li_filehandle=FileOpen (ls_pfilename streammode! , Read! , lockwrite! The Replace! If li_filehandle=1 Then The Return - 1 End the If If ls_pfilename="' Then Return 0 End the If Li_multiple=Round (ll_filelength/32765, 0) + 1 For I=1 To li_multiple If FileRead (li_filehandle lbb_photoread)=1 Then Return 1 Lbb_photo=lbb_photo + lbb_photoread Next FileClose (li_filehandle) If IsNull (lbb_photo) Then The Return - 1 End the If Lb_autocommit=sqlca. The AutoCommit The sqlca. The AutoCommit=True; UpdateBlob t_hrempl set fphoto=: lbb_photo; If the sqlca. SQLCode=0 Then COMMIT the Using the sqlca; The sqlca. The AutoCommit=lb_autocommit; Return 1 The Else The ROLLBACK Using sqlca; The Return - 1 End If CodePudding user response:
Or don't put pictures on DW In another window to build a PICTURE control, control PICTURE can directly use the BLOB variable In the data window the click (or double-click) in the event of writing code, after obtaining ID, retrieving data, display in the PICTURE control CodePudding user response:
Or don't put pictures on DW CodePudding user response:
AFIC, 9/f, reference response: with data through the database of the ole object can be Use this can solve...