Using the same form as the example of populating the combo box from Access, add a push button and paste the following code. Compare it with the original code. The differences are highlighted.

$insert XO_Equates
$insert DS_Equates
hXO = XOInstance('NWIND')
 
if hXO then
    hDS = DSInstance('CUSTOMERS_NWIND', hXO)
    if hDS then
      
      flag = DSMethod(hDS, DS_EXECUTE$)
      rv = DSGetProperty(hDS, DS_RECORD$, results)
      
     DSMethod(hDS, DS_DESTROY$)
    
    end
  convert @rm to @fm in results
  rv = Set_Property (@window : '.COMPANIES', 'LIST', results)
  XOMethod(hXO, XO_DESTROY$)
end

 

 

 

  • No labels