Vous consultez une page technique concernant le logiciel de gestion Mercator. Celle-ci contient des informations spécifiques destinées aux professionnels de Mercator. Souhaitez-vous être redirigés vers des informations plus générales ?


   Ne plus poser cette question

xLookUp : renvoie un champ d'un record dans une table selon une recherche indexée

0000000310     -      21/04/2017

Fonction : xLookUp

Zoom
public static object xLookUp(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup);
public static object xLookUp(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup, string compl_where);
public static object xLookUp(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup, string compl_where, List<MercatorSqlParam> lParam_compl_where);
public static bool xLookUpBool(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup);
public static bool xLookUpBool(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup, string compl_where);
public static bool xLookUpBool(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup, string compl_where, List<MercatorSqlParam> lParam_compl_where);
public static DateTime xLookUpDateTime(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup);
public static DateTime xLookUpDateTime(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup, string compl_where);
public static DateTime xLookUpDateTime(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup, string compl_where, List<MercatorSqlParam> lParam_compl_where);
public static decimal xLookUpDecimal(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup);
public static decimal xLookUpDecimal(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup, string compl_where);
public static decimal xLookUpDecimal(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup, string compl_where, List<MercatorSqlParam> lParam_compl_where);
public static double xLookUpDouble(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup);
public static double xLookUpDouble(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup, string compl_where);
public static double xLookUpDouble(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup, string compl_where, List<MercatorSqlParam> lParam_compl_where);
public static int xLookUpInt(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup);
public static int xLookUpInt(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup, string compl_where);
public static int xLookUpInt(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup, string compl_where, List<MercatorSqlParam> lParam_compl_where);
public static string xLookUpString(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup);
public static string xLookUpString(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup, string compl_where);
public static string xLookUpString(string table_lookup, string index_lookup, object valeur_lookup, string champ_lookup, string compl_where, List<MercatorSqlParam> lParam_compl_where);

Renvoi : un champ d'un record dans une table selon une recherche indexée - type object

Si on souhaite un renvoi d'un autre type, on peut utiliser

  • xLookupString
  • xLookupBool
  • xLookupDouble
  • ...

Paramètres :

  • nom de la table
  • nom de la colonne à utiliser pour la recherche
  • valeur à rencontrer pour cet index lors de la recherche
  • nom du champ dont on veut obtenir la valeur
  • paramètre optionnel : clause where (format SQL) pour fixer une condition

Exemple : xLookup("STOCK", "S_ID", dr["id_article"], "S_TEST") pour obtenir la valeur du champ S_TEST correspondant à un article sur une datarow correspondant à une ligne de document.

Avant d’utiliser cette fonction, veuillez prendre connaissance de cette page.