> >*--- Coneccion: Method that establish a connection to the database >*--- Getrs : Method that execute a T-SQL Sentence against the DB >*--- Desconectarse: Method to finish the connection >*--- Datos : Property that holds the ADO Recordset object created > >Thisform.Coneccion() > Thisform.Datos=Thisform.Getrs([Select * From Fotos Where Secuencia=6]) >Thisform.Desconectarse > >cFile=ADDBS(SYS(2023))+Thisform.Datos.Fields('Nombre').Value > >IF FILE(cFile) > ERASE &cFile >ENDIF > >oSt = CREATEOBJECT("ADODB.Stream") >oSt.Open >oSt.Type=1 &&&& adTypeBinary > > >oSt.Write(Thisform.Datos.Fields('Foto').Value) >oSt.SaveToFile(cFile) >oSt.Close() >Thisform.image1.Picture=cFile >Thisform.Refresh >