Hi Martijn, Sorry for the inconvenience created with this error and thanks for pointing it out. We will look into this area to see if there have been more bugs come alive over the years this code is being used. Please, don;t hesitate to identify problematic areas, because feedback is what we need to also prioritize our activities regarding bug-fixes and feature improvements (alongside our normal daily duties ;-)). regards, Martin Martijn Faassen wrote:
Hi there,
I just spent several hours scratching my head over why a piece of code didn't work. I was experimenting with Mapi and tried the example listed on the top of this page:
http://monetdb.cwi.nl/TechDocs/APIs/Mapi/C/index.html
This contains the following line:
if ((hdl = mapi_query(dbh, "create table emp(name varchar, age int)")) == NULL) die(dbh);
Unfortunately, it needs to be 'varchar(20)', not just plain 'varchar'. Just 'varchar' apparently does *not* result in an error, but instead all subsequent insert operations plus the select operation do nothing whatsoever; the fetching returns no results at all.
The combination of this very bad error reporting and the mistake in the very first example given on the C API page cost me quite a bit of time, so I'm slightly grumpy. :)
The bad example given is not good, but the way the error appears to be completely ignored is worse; this is not good for debuggability. The combination is terrible and not particularly conductive to the uptake of MonetDB.
It may be of course that this bug is already fixed in CVS; I'm working off the latest release.
Anyway, now that my test code finally works, I can hopefully make some progress hooking up XQuery to a Python API. (this is an experiment, and I realize the existing Python Mapi client code already ought to work, but we'll see..).
Regards,
Martijn
------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users