REBOL [ subject: "protocole client vers Odbc Socket Server" version: "1.0" author: "Olivier Auverlot" usage: { To install this protocol, you simply write do %OdbcSocketServer-scheme.r in your Rebol script. The protocol has then been added to the system object and is ready to use. Your Linux server (for example) is able then to connect to the data source mabase using an NT4/2000 server named serveur2000 : db: open OdbcSocketServer://olivier:homer@serveur2000/mabase insert db "select * from matable" print mold copy db ; <- XML result printed here close db } ] make root-protocol [ scheme: 'OdbcSocketServer port-id: 9628 port-flags: system/standard/port-flags/pass-thru open-check: none xml-request-template: system/words/copy { #CONNEXION } insert: function [ port data ] [ connection-string xml-request ] [ connection-string: system/words/copy "" if not none? port/target [ append connection-string join "DSN=" [ port/target ";" ] ] if not none? port/user [ append connection-string join "UID=" [ port/user ";" ] ] if not none? port/pass [ append connection-string join "PWD=" [ port/pass ";" ] ] xml-request: system/words/copy xml-request-template replace xml-request "#CONNEXION" connection-string replace xml-request "#REQUETESQL" data system/words/insert port/sub-port xml-request ] copy: func [ port ] [ make string! system/words/copy port/sub-port ] net-utils/net-install OdbcSocketServer self 9628 ]