I think you're running into the bug I reported on April 4:
Here's one I just ran into. Do NOT quote parameters in the <@BIND> meta tag. <@BIND NAME="text" SCOPE="user"> ==> [BoundVals] ["text"=' '] but <@BIND NAME=text SCOPE=user> ==> [BoundVals] [text='try now ';] I'll file a bug report.
On Apr 20, 2006, at 11:36 AM, Matt Muro wrote:
Thanks for the suggestion, Bill. Though it doesn't appear that you can use<@BIND> in a regular SQL statement.We do use <@BIND> when we are calling an Oracle function or procedure froma DirectDBMS action, but I can't get it to work in a plain ol' SQL statement right in the DirectDBMS action. Not to mention the fact thatthis would still require us to modify our code base, rather than simply ensuring that the witango.ini NOSQLENCODING is set to false, automaticallydoubling our single quote characters (as the doco says). Has anyone else using 5.5 found this non-doubling of quotes to be a problem? Have you simply modified all your insert/update statments toexplicitly set "encoding=sql" on fields that could potentially contain ahyphen? Thanks, Matt [email protected] writes:Sorry: INSERT INTO users ( user_id, user_name, date) VALUES (<@VAR name="user_id" scope="local">, <@BIND name="user_name" scope="local">, sysdate) On Apr 20, 2006, at 10:18 AM, William M Conlon wrote:Have you tried (despite some bugs and limitations):INSERT INTO users ( user_id, user_name, date) VALUES (<@VAR name="user_id" scope="local">, '<@BIND name="user_name" scope="local">', sysdate) On Apr 20, 2006, at 9:23 AM, Matt Muro wrote:I searched through the forum archives and saw some posts regarding Witango 5.5 and SQL encoding in DirectDBMS actions. It sounds like people WEREable to get the noSQLEncoding=false setting in the 5.5 witango.ini toautomatically quote meta tag values. This doesn't seem to be working for me, requiring me to add "encoding=sql" to all meta tag variables in my SQL insert/update statements. Is this .ini setting fried in 5.5 (Win32) or am I doing something wrong? Thank you. We're using: Witango Application Server 5.5.009 Liquorice (Win32) [Professional Edition] This worked in 5.0: [in witango.ini] NOSQLENCODING=false INSERT INTO users ( user_id, user_name, date)VALUES (<@VAR name="user_id" scope="local">, '<@VAR name="user_name"scope="local">', sysdate)-- producing the extra single quote in the user's name, O'Malley (damnIrish :) INSERT INTO users ( user_id, user_name, date) VALUES ( 1, 'O''Malley', sysdate)In 5.5, I have to add encoding=sql to my meta tags even though I haveNOSQLENCODING=false set in the witango.ini [in witango.ini] NOSQLENCODING=false INSERT INTO users ( user_id, user_name, date)VALUES (<@VAR name="user_id" scope="local">, '<@VAR name="user_name"scope="local" encoding="sql">', sysdate) INSERT INTO users ( user_id, user_name, date) VALUES ( 1, 'O''Malley', sysdate)From the "Witango 5.5 Programmer's Guide" page 494 (510 in PDF).noSQLEncoding Valid in all scopes This configuration variable determines whether text in Direct DBMS actions is SQL-encoded by default (single quote characters doubled). The default value is false. Setting the value to true turns off automatic SQL-encoding in Direct DBMS actions. If noSQLEncoding is set to true, you can use the ENCODING=SQL attribute on most value- returning meta tags to SQL-encode the value returned by that meta tag.------------------------------------------------------------------- --From the "Witango 5.5 Programmer's Guide" page 73 (89 in PDF).------------------------------- The SQL encoding type converts the specified value by doubling all occurrences of the single quote character. Witango Server automatically performs SQL encoding on meta tag values substituted in Direct DBMS SQL, except when the configuration variable noSQLEncoding is set to true. The SQL ENCODING attribute value is generally appropriate only when noSQLEncoding is set to true, and allows you to toggle SQL encoding on or off for particular meta tags. ________________________________________________________Matt Muro [EMAIL PROTECTED]Harvard University phone: 617.998.8522 Division of Continuing Education fax: 617.495.9176___________________________________________________________________ _____ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.tafBill William M. Conlon, P.E., Ph.D. To the Point 345 California Avenue Suite 2 Palo Alto, CA 94306 vox: 650.327.2175 (direct) fax: 650.329.8335 mobile: 650.906.9929 e-mail: mailto:[EMAIL PROTECTED] web: http://www.tothept.com____________________________________________________________________ ____ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.tafBill William M. Conlon, P.E., Ph.D. To the Point 345 California Avenue Suite 2 Palo Alto, CA 94306 vox: 650.327.2175 (direct) fax: 650.329.8335 mobile: 650.906.9929 e-mail: mailto:[EMAIL PROTECTED] web: http://www.tothept.com_____________________________________________________________________ ___TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf________________________________________________________ Matt Muro [EMAIL PROTECTED] Harvard University phone: 617.998.8522 Division of Continuing Education fax: 617.495.9176______________________________________________________________________ __TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
Bill William M. Conlon, P.E., Ph.D. To the Point 345 California Avenue Suite 2 Palo Alto, CA 94306 vox: 650.327.2175 (direct) fax: 650.329.8335 mobile: 650.906.9929 e-mail: mailto:[EMAIL PROTECTED] web: http://www.tothept.com ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
