Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Collection object within a SQL - SELECT statement?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01239238
Message ID:
01239385
Views:
11
>I'm trying to perform a select statement using a value from a collection and VFP doesn't seem to like what I'm doing. My code looks something like this:
>
>oCollection = createobject("Collection")
>oCollection.Add(newobject("manipulator","manipulator.prg"),"1")
>
>...
>
>select table1.key, oCollection.Item(1).Convert(table2.value);
>  from table1;
>  join table2 on table1.key = table2.key;
>  into cursor temp
>
>
>I get an [Function argument value, type, or count is invalid.] error.
>
>Is there any way to do what I'm attempting?
>
>Thanks for your help!
>
>Rodd
Isn't it easier to so this:
oManipulator = newobject("manipulator","manipulator.prg")

...

select table1.key, oManipulator.Convert(table2.value);
  from table1;
  join table2 on table1.key = table2.key;
  into cursor temp
Don't make oManipulator variable LOCAL.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform