CodePudding user response:
DW itemchanged events in writing codeCodePudding user response:
Control picture with code control canIf storage path: picture controls. PictureName='taken out to the database path'
If the deposit is of type blob images data: controls. SetPicture taken out a blob data (database)
CodePudding user response:
To 1/f, no.2nd floor of the like and I don't think of.
This is what I want in the data window are some of the information, the staff of the image control according to the data window changes of data in the data window records information and photos.
CodePudding user response:
Put the code after the DW saved successfullyCodePudding user response:
Stored in DW what eventsCodePudding user response:
My code is written soString ls_hao, ls_name
Blob gb_photo
Ls_hao=dw_1. GetItemString (1, "employee number"),//take the number of employees in the current data window
Ls_name=dw_1. GetItemString (1, "employee name")//get the current data window the employee name
Selectblob photo into: gb_photo from basic where employees=: ls_hao and employee name=: ls_name using the SQLCA.//from the database, which is corresponding to the current data window photo information
P_2. Setpicture (gb_photo)
But when the point of "next page" change data records in the window, the image controls the photos will not change.
Why is this?
CodePudding user response:
In dw rowfocuschanged event:Selectrow (0, false)
Selectrow (currentrow, true)
If isnull (currentrow) or currentrow=0 then currentrow=1
String ls_hao, ls_name
Blob gb_photo
Ls_hao=dw_1. GetItemString (currentrow, "employee number")//take the number of employees in the current data window
Ls_name=dw_1. GetItemString (currentrow, "employee name")//get the current data window in the employee name
Selectblob photo into: gb_photo from basic where employees=: ls_hao and employee name=: ls_name using the SQLCA.//from the database, which is corresponding to the current data window photo information
P_2. Setpicture (gb_photo)
CodePudding user response:
Upstairs method can be used, but a new problem. When I ordered "next page" when the last record to the database, there will be a crash, is this why?