hello thomas
create a function yourself like
FUNCTION myTableSeek(p_myTable is string , p_mySearch is string)
// p_mySearch is a string which have the criteria like this
// myCol1=toto, myCol2=25,.............
v_indice is int
v_ind is int = 1
v_myCol is string
v_myVal is string
FindRow is boolean
IF p_myTable = "" THEN RESULT(-1)
FOR v_indice=1 _TO_ {p_myTable}..Occurrence
FindRow = False
v_ind=1
LOOP
v_myCol = ExtractString(ExtractString(p_mySearch,v_ind,","),1,"=")
v_myVal = ExtractString(ExtractString(p_mySearch,v_ind,","),2,"=")
IF v_myCol = "" THEN BREAK
IF v_myCol =EOT THEN BREAK
IF {p_myTable+"."+v_myCol}[v_indice] = v_myVal THEN
FindRow = True
ELSE
IF FindRow THEN FindRow = False
END
v_ind++
END
IF FindRow THEN BREAK
END
IF v_indice > {p_myTable}..Occurrence THEN v_indice=-1
RESULT (v_indice)
example : my table named : tblTableSQL
and i have one colonne integer : IDCommande and one named : Nom
i use this function like this :
Trace(myTableSeek("tbl_TableSQL" , "IDCommande=2,nom=Sorofel-18"))
i have the indice of the first row find or -1
Regards