Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select SQl data using arrays
Message
From
16/08/2009 15:27:46
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
15/08/2009 14:40:28
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01418215
Message ID:
01418354
Views:
63
>>That's the only way I've found so far, too. Depending on your ODBC driver, there may be a limitation to the length of your command string - 8K it was in my case when I last had to do this. If you have such a long list, you may be better off creating a temp table on the server, inserting your values into it, then using it in server-side select, then dropping the table. This way you chop the problem into smaller pieces - and have multiple trips to the server, of course.
>
>I will take into consideration yours comments.
>By the way. Is it possible to use Arrays instead of strings ?

Maybe, it's usually not worth the trouble. VFP arrays are a beast of a special nature, done somewhat differently from any other language, which is the reason they are powerful but hard to pass as parameters. Even within Fox you need to pass them by ref (or else only the first element is passed by val); to pass them to a COM object you need to transform them via comarray() function. To pass them outside VFP - even in a XML, or into a file, or to an API function is near impossible or easier to workaround than solve.

With our option to pass stuff to SQL being strings only (or the automated value passing that VFP does behind the scenes when you insert expressions prefixed with a question mark - it all ends up as strings), something would have to translate the array into string values anyway. So... use what we have, for arrays just won't work.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform