[IronPython] Calling a query from .MDB (Access stored procedure) by name:

Davy Mitchell daftspaniel at gmail.com
Tue May 25 08:49:04 CEST 2010


Just a guess but could try 'select * from  queryname'?

Davy

On Mon, May 24, 2010 at 8:55 PM, Peter Masiar <peter.masiar at gmail.com>wrote:

> So I can connect to my little database now, thanks.
>
> I have a "query" in Access - I believe it's an Access term for a
> stored procedure.
> I'd like to call that stored procedure by name from my IronPython
> code. SQL text is huge (it inserts data from a Sharepoint "list",
> linked as access table, to real Access table for processing), ugly and
> hairy...
>
> I found command.ExecuteNonQuery(), but it checks for a valid SQL
> statement, and is unhappy with me providing just a "query" name. It
> says: Expected DELETE, INSERT, PROCEDURE, SELECT or UPDATE.
>
> I found also docs
> http://msdn.microsoft.com/en-us/library/yy6y35y8%28VS.71%29.aspx and
> OleDbCommand.CommandType but I am not sure how to set CommandType to
> Stored procedure. Any suggestions?
>
> Is there a way to execute Access "query" by name? Last resort would be
> copy-pasting the whole SQL enchilada from my "query" to IronPython as
> text SQL command.
>
> Thanks again
>
> --
> -----
> Peter Masiar
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>



-- 
--
 Davy Stuff  - http://daftspaniel.blogspot.com
 Geeky Stuff  - http://daftpython.blogspot.com
 Davy's Ironpython Editor - http://code.google.com/p/davysironpythoneditor/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100525/b29f92d7/attachment.html>


More information about the Ironpython-users mailing list