MB Software Solutions General Account wrote:
> Grigore Dolghin wrote:
>   
>> I sent yesterday a message about this, but somehow I messed it up and
>> I sent it as a reply to some other thread.
>>
>> Well, I needed to send a batch of sql commands to mysql through odbc
>> and I was getting synthax errors.
>>
>> After a while I found what the problem was - it's a OPTION value in
>> connection string. The OPTION clause is documented here:
>> http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-configuration-connection-parameters.html
>>
>> In ODBC 3.51.18 a new value was introduced, which allows multiple
>> statements. The option is FLAG_MULTI_STATEMENTS (67108864). If it is
>> used, and the batch has multiple SELECT statements in it, VFP creates
>> multiple result cursors.
>>
>> lcString = "Select * From users; Select * From modules"
>> SQLExec(nConnectionHandle, lcString, "crsTest")
>>
>> This creates two cursors - "crsTest" and "crsTest1".
>>
>> I'm writing this maybe someone will need this information.
>>     
>
>
> Good to know...thanks.
>
> But what's the real benefit over retrieving them one at a time?  Just
> curious.  Ricardo's post yesterday sparked this question.
>   
You can create temporary tables and the reuse them in many of your
queries, thus saving server resources. Anyway, withing vfp it is almost
natural, I had never entertained the idea of doing them one at a time.
Even sqlexec() names the returning cursors with a number, without
further fiddling, kind of like it's the natural thing to do.



--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to