Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object reference lost in SQL SELECT ?
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Object reference lost in SQL SELECT ?
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Miscellaneous
Thread ID:
01120146
Message ID:
01120146
Views:
63
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.
Next
Reply
Map
View

Click here to load this message in the networking platform