English
Instant Developer Foundation Documentazione
  • Reference Librerie
  • Librerie Componenti
  • Recordset
  • Metodi DO

Copy From

procedura copia link

Scopo

Copia questo recordset da un altro recordset passato come parametro. Questa procedura è particolarmente utile nell'ambito dell'evento OnGetSmartLookup del documento.

Sintassi

RecordSet.CopyFrom(recordset sorgente)

Argomenti

Recordset Sorgente E' il recordset da copiare.

Esempio di codice

// ******************************************************************
// Fired by the framework when a Smart Lookup procedure is in effect.
// ******************************************************************

event Prodotto.OnGetSmartLookup(
  inout Recordset RecordSet // Recordset returned to the Smart Lookup search engine
  inout int Level           // Try Level
  inout boolean NullValue   // Set to TRUE to return a null value
  inout boolean Skip        // Set to TRUE to skip normal processing
  inout boolean Cancel      // Set to TRUE to cancel further processing
  IDDocument CallerDocument // The document that needs the smart lookup procedure
)
{
  // Dopo i quattro tentativi standard,
  // controllo per fornitore

  if Level = C5
  {
    Recordset rs = new() // 
    // 
    Skip := True
    // 
    select into recordset distinct (rs)
      Prodotti.Id as IdProdotto(IDPRODOTTO)
      C[ +c Fornitori.NomeSocieta +c C] +c Space +c Prodotti.NomeProdotto as C[+cNomeSociet-
         aFornitori+cC]+cSpace+cNomeProdotto(NOMEPRODOTTO)
    from
      Prodotti  // Master Table
      Fornitori // Joined with Prodotti using FK FornitoriProdotti
    where
      Fornitori.NomeSocieta Like Percent +c NomeProdotto +c Percent
    order by
      C[+cNomeSocietaFornitori+cC]+cSpace+cNomeProdotto
    // 
    RecordSet.CopyFrom(rs)
  }
  // 
  // ora controllo per paese fornitore

  if Level = C6
  {
    Recordset rs = new() // 
    // 
    Skip := True
    // 
    select into recordset distinct (rs)
      Prodotti.Id as IdProdotto(IDPRODOTTO)
      C[ +c Fornitori.NomeSocieta +c C] +c Space +c Prodotti.NomeProdotto as C[+cNomeSociet-
         aFornitori+cC]+cSpace+cNomeProdotto(NOMEPRODOTTO)
    from
      Prodotti  // Master Table
      Fornitori // Joined with Prodotti using FK FornitoriProdotti
    where
      Fornitori.Paese Like Percent +c NomeProdotto +c Percent
    order by
      C[+cNomeSocietaFornitori+cC]+cSpace+cNomeProdotto
    // 
    RecordSet.CopyFrom(rs)
  }
  // 
  if Level = C7
  {
    Cancel := True
  }
}
  • Questa procedura può essere usata per ritornare un recordset in un evento che lo passa come parametro.

Ultima modifica: 23/03/2021 / Validità: da 6.5.2680

Vedi Anche

  • On Get Smart Lookup (evento)

Hai trovato utile l'articolo?

Grazie per il feedback!

Ti serve altro aiuto?

Consulta il Forum