On Tue, Mar 02, 2004 at 12:14:35PM -0800, Tom Jackson wrote: > On Tue, 2004-03-02 at 11:29, Andrew Piskorski wrote: > > > Hm, I'd forgotten about that. Tom, how did work on your ODBC/nssolid > > driver for use with unixodbc go? And can you tell us something about > > why using the nssolid driver code was a better starting point than > > either nsodbc or Jerry Asher's odbc2 driver? > > I wasn't aware of odbc2, but it sounds like it didn't work when you > tried it. I'm not too interested in the bind var support from the pg
I did not work right when I tried it (strange errors; it's all in old posts to the arsdigita.com or openacs.org forums somwhere), but I only tried it with some commercial ODBC driver manager - ah yes, "Merant Connect ODBC". I've no idea whether it would have worked with unixodbc or not, nor even whether I really had that Merant stuff configured right. I got it to work well enough with nsodbc for some testing and evaluation I needed to do, and that was it. > driver. The database still thinks it is getting a different query each > time, but it does eliminate the problem of sql smuggling. If it isn't > too hard to add, sounds like you did it easily, I might have more > trouble :), maybe that should be added. :) Well, I still have it in my local CVS. Looks like I just copied 480 lines of bind variable emulation code from postgres.c rev. 1.31 2001/08/24 and dropped it into the nsodbc_v1 code. So I guess it really was easy. I think it worked the first time even. Uh, I guess the rev 1.31 means I the postgres code from OpenACS. Yeah, my comments in the code say I got it from here: cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/acs-pg login cvs -z3 -d:pserver:[EMAIL PROTECTED]:/cvsroot/acs-pg co driver-2.3 The nspostgres.c in SourceForge should be a more up-to-date version of the same postgres code, of course. I can send you my ancient tweaks to nsodbc if you want, including the bind variable emulation stuff. Of course, maybe it would really be better to have a "nsbindvaremu.so" module for use by nspostgres, nsodbc, etc. Looks like all the code actually does is create a "ns_pg_bind" Tcl command, so that should be just fine to have that in an independent module instead. Make it the "ns_bindemu" Tcl command or something. Hm, maybe that should actually be movded into the standard ns_db API? I never looked closely but there's other stuff like that too, LOBs, etc. It would be kind of nice if there was one standard ns_db interface to such extended features, and "ns_db blob" would just error out with "unsupported by this particular database" if necessary. > (Maybe it would be nice to somehow have the bind var code create a > store procedure and handle things normally, eliminating extra calls > at the tcl level to add the attributes) Dunno, I never looked much at how the bind variable emulation actually worked, I just figured the OpenACS guys who wrote it must have known what they were doing and slapped it in. :) -- Andrew Piskorski <[EMAIL PROTECTED]> http://www.piskorski.com/ -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
