Scott and Ben, Thanks for the advice. That was the problem.
Steve -----Original Message----- From: Scott Cadillac [mailto:[EMAIL PROTECTED] Sent: Saturday, August 09, 2003 1:30 AM To: [EMAIL PROTECTED] Subject: Witango-Talk: RE: Witango-Talk: Hi Steve, By default, Variables called inside a Direct DBMS Action have the ENCODING=SQL attribute applied, which turns a single-quote into two single-quotes (SQL escaping). There is more than one way to get around this, but the following is probably the simplest solution: Where <@var local$Select ENCODING=NONE> But of course, that also means if you are dynamically building your own SQL Statements, you should be careful to make sure you use SQL escaping. In the following example, I turned your date value into a string value for demonstration purposes: <@assign local$Select "( (o1.C_ID=<@var domain$CompanyID>) and (o1.Ord_OrderDesc='<@VAR local$Desc ENCODING=SQL>') ) "> The Variable local$Desc now has ENCODING=SQL because if the string had contained a single-quote as part of the text, and ENCODING=SQL was not used - it would have broken the SQL Statement. Of course, when the finished Variable is called in the Direct DBMS Action, again call it with ENCODING=NONE. Hope this helps. Cheers..... Scott Cadillac, Witango.org - http://witango.org 403-281-6090 - [EMAIL PROTECTED] -- Information for the Witango Developer Community --------------------- XML-Extranet - http://xml-extra.net 403-281-6090 - [EMAIL PROTECTED] -- Well-formed Development (for hire) --------------------- > -----Original Message----- > From: Fogelson, Steve [mailto:[EMAIL PROTECTED] > Sent: Saturday, August 09, 2003 12:18 AM > To: Witango User Group (E-mail) > Subject: Witango-Talk: > > > I am having trouble with a DBMS > > When I put single quotes around <@currentdate>, the Where > clause in my DBMS > comes out with 2 singles quotes on either end of the > <@currentdate>. If I > remove the single quotes, I don't get any single quotes or > double quotes. > Both conditions give me an "Invalid TEXT error". > > <@assign local$Select "( (o1.C_ID=<@var domain$CompanyID>) and > (o1.Ord_OrderNumber='<@currentdate format="%Y%m%d">') ) "> > > DBMS > Where > <@var local$Select> > > With single quotes, Gives > (o1.Ord_OrderNumber=''20030809'') > > Without single quotes, Gives > (o1.Ord_OrderNumber=20030809) > > Any suggestions? > > Thanks > > Steve Fogelson > Internet Commerce Solutions > ______________________________________________________________ > __________ > TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf > ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
