Re: Updating Integer value in DB

This WebDNA talk-list message is from

2007


It keeps the original formatting.
numero = 68681
interpreted = N
texte = The [math] context is very picky.  It will not work correctly if the variable name includes a minus (-) or a period (.)

Example of variables that will produce failures when you try to use them inside [math][/math] are:
[math][on-hand]+1[/math]
[math][on.hand]+1[/math]
In my experience these would both produce errors.  I will assume that a space will cause the same error.  The underscore (_) character has no usage in any language, mathematical context or any other real world usage, and therefore it is a safe character to use in all variable and database field names.

Matt
-- Matthew A PerosiPsi Prime, Inc.http://www.psiprime.com323 Union Blvd.Totowa, NJ 07512P: 973.225.9870F: 973.413.8217

Ki Song wrote:
From: Matthew A Perosi <matt@psiprime.com>Reply-To: "WebDNA Talk" <WebDNA-Talk@talk.smithmicro.com>Date: Wed, 14 Mar 2007 12:34:10 -0400To: "WebDNA Talk" <WebDNA-Talk@talk.smithmicro.com>Subject: Re: Updating Integer value in DBI used to run into a lot of problems with database fields with spaces inthem.  i.e. "ON HAND" instead of the more reliable "ON_HAND".  I'vegotten them to work, but not without [url]ing everything.That said, I see 2 errors in your code so try this:You have a typo of "wqSKUdatarq" instead of "eqSKUdatarq"And the variable ON_HAND needs to be stated as a variable in [] insidethe [math] context.[replace db=^inventory.db&eqSKUdatarq=[SKU]]ON_HAND=[MATH][ON_HAND]+[updatevalue][/MATH][/replace]    
The wq was a typo on the email, not the actual code.I did that, but it does not update.Do you think the ON HAND, as opposed to an ON_HAND, may be the problem?-------------------------------------------------------------This message is sent to you because you are subscribed to  the mailing list <WebDNA-Talk@talk.smithmicro.com>.To unsubscribe, E-mail to: <WebDNA-Talk-off@talk.smithmicro.com>To switch to the DIGEST mode, E-mail to <WebDNA-Talk-digest@talk.smithmicro.com>Web Archive of this list is at: http://webdna.smithmicro.com/  



-------------------------------------------------------------This message is sent to you because you are subscribed to  the mailing list <WebDNA-Talk@talk.smithmicro.com>.To unsubscribe, E-mail to: <WebDNA-Talk-off@talk.smithmicro.com>To switch to the DIGEST mode, E-mail to <WebDNA-Talk-digest@talk.smithmicro.com>Web Archive of this list is at: http://webdna.smithmicro.com/





Associated Messages, from the most recent to the oldest:

    
  1. Re: Updating Integer value in DB ( Stuart Tremain 2007)
  2. Re: Updating Integer value in DB ( Matthew A Perosi 2007)
  3. Re: Updating Integer value in DB ( Donovan Brooke 2007)
  4. Re: Updating Integer value in DB ( "Dan Strong" 2007)
  5. Re: Updating Integer value in DB ( Matthew A Perosi 2007)
  6. Re: Updating Integer value in DB ( Ki Song 2007)
  7. Re: Updating Integer value in DB ( Jim Ziegler 2007)
  8. Re: Updating Integer value in DB ( Matthew A Perosi 2007)
  9. Updating Integer value in DB ( Ki Song 2007)
The [math] context is very picky.  It will not work correctly if the variable name includes a minus (-) or a period (.)

Example of variables that will produce failures when you try to use them inside [math][/math] are:
[math][on-hand]+1[/math]
[math][on.hand]+1[/math]
In my experience these would both produce errors.  I will assume that a space will cause the same error.  The underscore (_) character has no usage in any language, mathematical context or any other real world usage, and therefore it is a safe character to use in all variable and database field names.

Matt
-- Matthew A PerosiPsi Prime, Inc.http://www.psiprime.com323 Union Blvd.Totowa, NJ 07512P: 973.225.9870F: 973.413.8217

Ki Song wrote:
From: Matthew A Perosi <matt@psiprime.com>Reply-To: "WebDNA Talk" <WebDNA-Talk@talk.smithmicro.com>Date: Wed, 14 Mar 2007 12:34:10 -0400To: "WebDNA Talk" <WebDNA-Talk@talk.smithmicro.com>Subject: Re: Updating Integer value in DBI used to run into a lot of problems with database fields with spaces inthem.  i.e. "ON HAND" instead of the more reliable "ON_HAND".  I'vegotten them to work, but not without [url]ing everything.That said, I see 2 errors in your code so try this:You have a typo of "wqSKUdatarq" instead of "eqSKUdatarq"And the variable ON_HAND needs to be stated as a variable in [] insidethe [math] context.[replace db=^inventory.db&eqSKUdatarq=[SKU]]ON_HAND=[math][ON_HAND]+[updatevalue][/MATH][/replace]    
The wq was a typo on the email, not the actual code.I did that, but it does not update.Do you think the ON HAND, as opposed to an ON_HAND, may be the problem?-------------------------------------------------------------This message is sent to you because you are subscribed to  the mailing list <WebDNA-Talk@talk.smithmicro.com>.To unsubscribe, E-mail to: <WebDNA-Talk-off@talk.smithmicro.com>To switch to the DIGEST mode, E-mail to <WebDNA-Talk-digest@talk.smithmicro.com>Web Archive of this list is at: http://webdna.smithmicro.com/  



-------------------------------------------------------------This message is sent to you because you are subscribed to  the mailing list <WebDNA-Talk@talk.smithmicro.com>.To unsubscribe, E-mail to: <WebDNA-Talk-off@talk.smithmicro.com>To switch to the DIGEST mode, E-mail to <WebDNA-Talk-digest@talk.smithmicro.com>Web Archive of this list is at: http://webdna.smithmicro.com/



 Matthew A Perosi 

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Shared conversion under WebTen (1998) AAgghh!! Help, please. SSL strikes again. (1997) OT: Version Control (2007) Try not to laugh (2007) emailer w/F2 (1997) Loops N Variables (1998) Cart Numbers (1997) Execute Applescript (1997) Trouble with formula.db (1997) many-to-one problem (1998) Postprocessing CCs (2000) MultiGroupChecker (2000) New Docs (2003) NT Manual (1997) Running _every_ page through WebCat ? (1997) Counting records (2000) What really killed WebDNA? (2007) [WebDNA] Store module/site (2012) Unknown error: OrderNotCreated (1997) WebDNA Threaded Discussions? (2004)