>Hi,
>I have a form with ole bound control on it. In the action event of a buton on the form, I am getting a file name from user and loading that file into a table field. When I do it, the form is getting paited with the values of local variables in the click method.
>Given below is the code in my click method:
>========================================
>local lcFileName, lsIdParticipant
>lcFileName = GETFILE("Photo Files:gif,bmp,jpeg,jpg", "c:\", "Select", 0, "Choose Picture")
>IF !EMPTY(lcFileName)
> lsIdParticipant = THISFORM.m_sIdParticipant
> IF NOT SEEK(lsIdParticipant,"photo","photo_idx")
> * Create a new record with the id 'idParticipant'
> APPEND BLANK IN photo
> REPLACE participant_id WITH lsIdParticipant IN photo
> THISFORM.m_bIsRecAdded = .T.
> ENDIF
>
> APPEND GENERAL photo.picture_data FROM (lcFileName)
> THISFORM.m_bIsPhotoAdded = .T.
>ENDIF
>========================================================
>
>What am I doing wrong that is causing the values getting printed on the form?
>
It's likely that the value of SET TALK is being altered somewhere - SET TALK is scoped to the datasession, so if the datasession changes just before the method code is called, that might be an answer. Forms with private datasession may do this even if they don't explicitly open files, although clearly your code expects to find files open and ready to use.