[MonetDB-users] Error in SELECT from a function via Mapi
Hi, I'm having problems calling a function via the Mapi interface (using Visual C++ under Windows and the 15th November download). It works fine when I call it directly, but fails when I call via Mapi. I create the function: create function tick.dummy(a integer) returns table (entry integer) begin return (select 1); end; I can then call this directly from mclient without any problems: sql>select entry from tick.dummy(1); +-------+ | entry | +=======+ | 1 | +-------+ 1 tuple (1.074ms) sql> However, if I call via Mapi I receive an error: SELECT: no such unary operator 'dummy(tinyint)' I'm using the following sequence of API calls: MapiHdl handle = mapi_prepare(connection, "SELECT entry FROM tick.dummy(?)"); int param(0); mapi_param_type(handle, 0, MAPI_INT, MAPI_AUTO, ¶m); if (mapi_execute(handle) != MOK) { // Error here } The above seems to work fine for a general SELECT statement, but fails for one with a function. Is there a different syntax for calling via Mapi? Iain
participants (1)
-
Iain Buchanan