On Mar 2, 2012, at 2:13 PM, Lackder Si-youcef wrote:

> Someone  can tell me why i get those errors when I do: 
> 
> $map := """ 
> $Primary_Key:[Annuaire]Primary_Key; 
> $Entreprise:[Annuaire]Entreprise; 
> $Nom:[Annuaire]nom; 
> $Prenom:[Annuaire]Prenom; 
> $hasMiniSite:[Annuaire]Has_Site; 
> $DateSiteDebut:[annuaire]Site_Date_debut; 
> $DateSiteFin:[annuaire]Site_Date_fin; 
> $hasSite:[Annuaire]Site; 
> $hasEmail:[Annuaire]Email; 
> $noRue:[Annuaire]no_Rue; 
> $TypeRue:[Annuaire]Type_Rue; 
> $NomRue:[Annuaire]nom_Rue; 
> $CompRue:[Annuaire]Comp_Rue; 
> $CodePostal:[Annuaire]Code_Postal; 
> $Ville:[Annuaire]Ville; 
> $rubrique:[Annuaire]rubrique""" 

While I don't think your map keys have anything to do with the errors, field 
keys are usually just text without the $. When you'd start iterating through 
the row you have something like $row{"$Primary_key"} instead of 
$row{"Primary_key"}. Since the key is just text, I'm sure the $ would work, but 
not the convention I've seen used.
> 
> rs:= RowSet.newFromSelection(->[Annuaire];$map;100;"";"RS_Annuaire";0) 

I assume that this is a cut and paste error and you missed the $rs. If you 
didn't have the local $, this could be the problem.
> 
> Active4D error 
> Source        Method  Line 
> /Users/Lacky/Desktop/LiSa/LiSa.4dbase/web/index.a4d   [main]  122 
> [text block]  RowSet.newFromSelection 2 
> [text block]  RowSet.newFromCachedSelection 1 
> [text block]  RowSet._new     37 
> [text block]  RowSet.clearPersistent  5 
Do you already have "RS_Annuaire" defined as a persistent row? If your new call 
was the first time it was called, there should not have been a call to deep 
clear collection.

Did you get it to work once and then modified something? 

> deep clear collection($rs) 
> Array index out of bounds (1)

Maybe you should try it first without the persistent name and once you get 
everything working, add the name back.

Steve



_______________________________________________
Active4D-dev mailing list
[email protected]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://vasudev.aparajitaworld.com/archive/active4d-dev/

Reply via email to