All, Who currently maintains the AOLserver Oracle driver? I made a few changes to it. Below is a brief summary that I wrote to explain the changes. I wanted to get any feedback on the API call, if any.
This new version adds multiple OUT variables, and the ability to bind a single REF CURSOR. The single REF CURSOR limitation is because the current driver only allows for a single OCIStmt handle to be associated with a db handle. That is the *ONLY* reason for the limitation. Should we write [ns_oracle exec|fetch|etc $stmt] this limitation could go away. And yes, to use the new command you call [ns_oracle] not [ns_ora]. The new [ns_oracle] is written against the Tcl 8.x API and the older version is not so I had to create a new command. The new command is as follows: Syntax: ns_oracle plsql dbhandle sql ?ref? Optional arguments: ?ref? - Name of bind variable that is a REF CURSOR. Example: set db [ns_db gethandle] set out "" set firm_id 44 set firm_name "My new Firm name" ns_oracle plsql $db "begin pmpc_admin.rename_firm(:firm_id, :firm_name, :out); end;" Notes: Note how I had to set "out" to an empty string. This is required for any argument unless you specify it as a REF CURSOR. I think this is a reasonable request and makes implementation easier. Alternatively we could just always default to "" if the variable doesn't exist but that might have unwanted side effects. Finally we could continue with the horrible way the current driver does it and require that the programmer tell us which bind variables are OUT. Jeremy
