>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?
>
>Thanks
>Puri
Sounds like your form has a private datasession. Set talk off (in init, load, de.beforeopentables, activate etc).
Cetin