Just a guess but could try &#39;select * from  queryname&#39;?<div><br></div><div>Davy<br><br><div class="gmail_quote">On Mon, May 24, 2010 at 8:55 PM, Peter Masiar <span dir="ltr">&lt;<a href="mailto:peter.masiar@gmail.com">peter.masiar@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">So I can connect to my little database now, thanks.<br>
<br>
I have a &quot;query&quot; in Access - I believe it&#39;s an Access term for a<br>
stored procedure.<br>
I&#39;d like to call that stored procedure by name from my IronPython<br>
code. SQL text is huge (it inserts data from a Sharepoint &quot;list&quot;,<br>
linked as access table, to real Access table for processing), ugly and<br>
hairy...<br>
<br>
I found command.ExecuteNonQuery(), but it checks for a valid SQL<br>
statement, and is unhappy with me providing just a &quot;query&quot; name. It<br>
says: Expected DELETE, INSERT, PROCEDURE, SELECT or UPDATE.<br>
<br>
I found also docs<br>
<a href="http://msdn.microsoft.com/en-us/library/yy6y35y8%28VS.71%29.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/yy6y35y8%28VS.71%29.aspx</a> and<br>
OleDbCommand.CommandType but I am not sure how to set CommandType to<br>
Stored procedure. Any suggestions?<br>
<br>
Is there a way to execute Access &quot;query&quot; by name? Last resort would be<br>
copy-pasting the whole SQL enchilada from my &quot;query&quot; to IronPython as<br>
text SQL command.<br>
<br>
Thanks again<br>
<font color="#888888"><br>
--<br>
-----<br>
Peter Masiar<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>--<br>  Davy Stuff  - <a href="http://daftspaniel.blogspot.com">http://daftspaniel.blogspot.com</a>  <br>  Geeky Stuff  - <a href="http://daftpython.blogspot.com">http://daftpython.blogspot.com</a><br>
  Davy&#39;s Ironpython Editor - <a href="http://code.google.com/p/davysironpythoneditor/">http://code.google.com/p/davysironpythoneditor/</a><br>
</div>