
Hi Fabian,
Thank you for your quick reply.
I understand that MonetDB always run in a client/server model. I guess what
I'm looking for is the ability to run it in the same address space as the
client application written in Python on Win XP.
For instance, this page:
http://monetdb.cwi.nl/projects/monetdb/SQL/Documentation/A-Simple-Example.ht...
gives an example of how it's done in C. In the 2nd paragraph, it stays that
"...Upon success of this call, there will be a separate server thread
running in the same user space to handle the database requests."
I'm trying to figure out how to do the same in Python but there doesn't seem
to be much documentation. From what you're saying, I guess it's not
possible to do it in Python and/or on Windows at the moment? Could you
please clarify? That is: a) can't on Python, b) can't on Windows, or c)
can't on both?
Also, I've had a chance to take a glance at the python code and I saw the
following strange bit in CMapi.py:
class Embedded(Mapi):
def __init__(self, dbfarm = None, dbname = "demo", lang = "sql"):
try:
import monetdb
if lang == "sql":
self._Mapi__mid = monetdb.monetdb_sql(dbfarm, dbname)
except:
e, value
print(e)
if not self._Mapi__mid:
raise IOError("Creating connection structure failed")
if self.error():
raise IOError(self.error_str())
The following errors are pretty obvious:
1) Indentation is incorrect, which means that the python crashed when it
reached this section. It seems strange that while the the rest of the file
uses spaces for indentation, this particular uses tabs.
2) The "except" clause has incorrect syntax.
3) There doesn't seem to be a monetdb module to import.
I've tried to correct it on my own. I think it probably should look
something like this (please correct if I'm wrong):
class Embedded(Mapi):
def __init__(self, dbfarm = None, dbname = "demo", lang = "sql"):
try:
import monetdb
if lang == "sql":
self._Mapi__mid = monetdb.monetdb_sql(dbfarm, dbname)
except Exception, value:
print(value)
if not self._Mapi__mid:
raise IOError("Creating connection structure failed")
if self.error():
raise IOError(self.error_str())
But still, not having the monetdb module makes it a no-go....
On 5/12/07, Fabian Groffen
Hi Blackie,
On 12-05-2007 04:40:41 -0700, Blackie Hlasek wrote:
Just to clarify my last message: I would like to know how to use Python 2.5 (on Win XP) to run monetdb as an embedded server.
MonetDB always runs in a client/server model. No true embedded version of MonetDB currently exists. A slimmed down version of MonetDB is as far as I am aware not available on the Windows platform.
On 5/12/07, Blackie Hlasek <[1]blck.hl@gmail.com> wrote:
I'm running Python 2.5 on Windows XP Pro SP2.
I've successfully installed the windows binary distribution (MonetDB5-SQL-2.16.2.msi).
I've successfully run the Python example (on the website) which connects to the standalone server.
How do I run monetdb as an embedded server? Any advice would be appreciated.
Thanks!
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users