hmmmmmm... it looks like the string is okay. It&#39;s just stupid me who forgot that in SmallTalk you write &#39;&#39; twice to escape it. So the problem appears to be another:<br>==========<br>executeQuery: aQuery <br>&nbsp;&nbsp;&nbsp; | queryInfo r |<br>
&nbsp;&nbsp;&nbsp; queryInfo := self class queryInfoFor: aQuery.<br>&nbsp;&nbsp;&nbsp; queryInfo isNil <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ifTrue: <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; [JdmErrorTable errorTable throwException: #invalidQuery message: aQuery].<br>&nbsp;&nbsp;&nbsp; (connection requestPacket writeStream)<br>
&nbsp;&nbsp;&nbsp;&nbsp; nextPutCommand:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (JdmMysqlCommand withCommandNamed: #query message: aQuery);<br>&nbsp;&nbsp;&nbsp; flush.<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; r := self createResult: queryInfo.<br>&nbsp;&nbsp;&nbsp; ^r<br>=============<br>queryInfo is nil... Most probably this method wasn&#39;t written to call stored procedures. As a quick workaround I&#39;ll create a temporay table with two fields (in &amp; out) and a Before Insert trigger that will execute the procedure on the input and place the output on the corresponding field of the same record. So I can insert the command and immediately after that I can query the last_insert_id to get my result.<br>
<br>But it would be much nicer if I could avoid doubling the number of db interactions, since this is where most performance gets killed. Can Anyone tell me how I can contact the author of Mysql-driver? Maybe it&#39;s possible to find something better than my poor hack.<br>
<br>Bčrto<br><br><div class="gmail_quote">2008/6/20 Bčrto ëd Sčra &lt;<a href="mailto:berto.d.sera@gmail.com">berto.d.sera@gmail.com</a>&gt;:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39; really doing something wrong :) This is what I tried:<br><br>======================================================<br>| connection spec statement resultSet value OWm2command|<br>Socket initializeNetwork.<br>Transcript open.<br>

spec :=&nbsp;&nbsp;&nbsp; (JdmConnectionSpec new initialize<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user: &#39;root&#39;; password: &#39;owm2&#39;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host: (NetNameResolver addressForName: &#39;localhost&#39;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; database: &#39;owm2&#39;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; port: 3306).<br>

<br>OWm2command := &#39;OWM2_PARSE(&#39;,$&#39; asString,&#39;&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;&lt;OWM2&gt;&lt;Query command=&quot;list&quot; type=&quot;class&quot; id=&quot;12&quot; &gt;&lt;Output /&gt;&lt;/Query&gt;&lt;/OWM2&gt;&#39;,$&#39; asString,&#39;)&#39;.<br>

<br>connection := JdmConnection on: spec.<br>statement := connection createStatement.<br>resultSet := statement executeQuery: OWm2command.<br>&quot;print column names&quot;<br>Transcript cr; show: (resultSet columns collect: [:col | col name]) asString.<br>

&nbsp;&nbsp;&nbsp; <br>[resultSet next]<br>whileTrue:<br>[<br>&nbsp;&nbsp;&nbsp; value := resultSet valueNamed: &#39;id_object&#39;. &quot;get column named name&quot;<br>&nbsp;&nbsp;&nbsp; Transcript cr; show: value printString.<br>].<br>connection close.<br>============================<br>

<br>Obviously it could not go to the end, but I was expecting to be able to inspect the resultSet and find out how to call the &quot;column&quot; from there. Actually this function returns simply an XML string. Yet the point where I&#39;m breaking is the query execution itself. It *might* be because the concation I tried looks weird. What I see inspecting the values is:<br>

&#39;OWM2_PARSE(&#39;&#39;&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;&lt;OWM2&gt;&lt;Query command=&quot;list&quot; type=&quot;class&quot; id=&quot;12&quot; &gt;&lt;Output /&gt;&lt;/Query&gt;&lt;/OWM2&gt;&#39;&#39;)&#39;<br>

<br>Now... this will surely break because it was meant to have &quot; only for the internal XML parameters...so this way the string cannot be passed. I&#39;m sure there&#39;s a way, only I cannot find it.<br>Bčrto<br><br>

<br><br><br><div class="gmail_quote">2008/6/20 Bčrto ëd Sčra &lt;<a href="mailto:berto.d.sera@gmail.com" target="_blank">berto.d.sera@gmail.com</a>&gt;:<div><div></div><div class="Wj3C7c"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

All seems to work fine, I have but one problem: how do you state a &quot;string in a string&quot;? The query I need to execute inputs an XML command to a stored proc, so it looks like<br>resultSet := statement executeQuery: &#39;OWM2_PARSE(&#39;&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;&lt;OWM2&gt;&lt;Query command=&quot;list&quot; type=&quot;class&quot; id=&quot;12&quot; &gt;&lt;Output /&gt;&lt;/Query&gt;&lt;/OWM2&gt;&#39;)&#39;.<br>


<br>Can&#39;t remember what&#39;s the equivalent of <br>resultSet := statement executeQuery: &#39;OWM2_PARSE(/&#39;&lt;?xml
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;&lt;OWM2&gt;&lt;Query
command=&quot;list&quot; type=&quot;class&quot; id=&quot;12&quot; &gt;&lt;Output
/&gt;&lt;/Query&gt;&lt;/OWM2&gt;/&#39;)&#39;.<br>in smalltalk... <br><br>Very stupid question, I know :(<br>Bčrto<br><br><div class="gmail_quote">2008/6/16 Keith Hodges &lt;<a href="mailto:keith_hodges@yahoo.co.uk" target="_blank">keith_hodges@yahoo.co.uk</a>&gt;:<div>

<div></div><div><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>Bčrto ëd Sčra wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
A connection for statement is not a problem, since I can pack any number of queries into a single XML statement it&#39;s not going to impact on performance ;) I&#39;ll try this later this week and let you know if it works.<br>



Thanks<br>
Berto<br>
<br>
</blockquote></div>
Try <a href="http://www.squeaksource.com/MySql" target="_blank">http://www.squeaksource.com/MySql</a> for more recent version of the driver. You don&#39;t actually need a new connection for each query, but that is the way that I use it myself.<br>



<br>
There is also some code for using the driver in <a href="http://mc.lukas-renggli.ch/magritteaddons" target="_blank">http://mc.lukas-renggli.ch/magritteaddons</a> package Magritte-RDB<br><font color="#888888">
<br>
Keith<br>
<br>
<br>
<br>
<br>
</font></blockquote></div></div></div><br>
</blockquote></div></div></div><br>
</blockquote></div><br>