Zope and NT databases

fxml at excite.com fxml at excite.com
Mon Jan 10 22:17:50 EST 2000


Hi everyone,
  I am the author of ODBC Socket Server.  If someone writes a Python
client for ODBC Socket Server, please feel free to e-mail it to me and I
will include it in the base distribution.  I will also give you full
credit for the client :)
  Thanks for trying ODBC Socket Server, and if you have any specific
questions please let me know by e-mail or in this newsgroup.  Thanks to
Marc and Jochen for making me aware of this thread.

Thanks,

Tyler

In article <85dimq$pi7$1 at nnrp1.deja.com>,
  marc_risney at my-deja.com wrote:
> Hmmm, yes Zope is one way to do it, ODBC Socket Server,
> is actually rather elegant, here is sample code that you could use
> provided that you download the ODBC Socket Server
> from http://odbc.linuxbox.com/products.html
>
> Python 1.5.2 (#1, Jan  6 2000, 15:54:56)  [GCC egcs-2.91.66 19990314
> (egcs-1.1.2
>   on linux2
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>>from socket import *
> >>>import select
>
> >>>FORWARD = 'ntbox.domain.com'
> >>>PORT = 9628
> >>>s = socket(AF_INET, SOCK_STREAM)
> >>>s.connect(FORWARD, PORT)
>
> >>>conn_str = "DSN=ODBCSS;UID=;PWD=;"
> >>>sql_str = "insert into Table1 values ('test1','test2')"
>
> >>>xml_str = """<?xml version=\"1.0\"?
> >\r\n<request>\r\n<connectionstring>""" + conn_str
> + "</connectionstring>\r\n<sql>" + >>>sql_str
> + "</sql>\r\n</request>\r\n"
> >>>s.send(xml_str)
> >>>msg = s.recv(1024)
> >>>s.close()
> >>>print str(msg)
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list