Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object reference lost in SQL SELECT ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Object reference lost in SQL SELECT ?
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Divers
Thread ID:
01120146
Message ID:
01120146
Vues:
60
I have the following SQL SELECT statement:
   cSQLStatement = "SELECT column1, column2, alltrim(object1.object2.property1) as column3 FROM cursor1 INTO CURSOR cursor2 READWRITE"
I execute it by using:
   &cSQLStatement
The problem is that very often for no reason I get an error message "ALIAS object2 is not found". It sometimes works, and sometimes doesn't. Object variable "object1" is declared in the method, it has a member property "object2" properly created, as well as character member property "property1" properly created. If I check the value of object1.object2.property1 before or after the statement, I get a correct value.

At the same time, if I create property "property1" as a member of "object1", then this allways works (i.e. the expression would be ...alltrim(object1.object2.property1)...).

Real names of columns, properties, cursors and objects references are quite unique in my testing and they are not reserved words, so I could exclude this part.

Does anyboby have suggestions on what could be causing this behaviour.

The environment is: VFP 9, SP1, W2003 Server, MTDLL.

Thanks you!
Igor.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform