Hi Bryan,

Your error message sounds like something from the database, but you didn't
mention what kind you have. 

For healthy database storage purposes, don't store your number with
pretty-printed formatting.

Most databases will use a different format for the raw storage of the value
then what you often see from your database GUI manager. This is especially
true for "datetime" fields. 

If the field is a "number" type of some kind, then feed it a proper number.
As far as most databases are concerned, a value like 350,000 is a string so
it'll complain.

As well, SQL doesn't typically use quotes for number values (SQL generated
by Witango or otherwise), so having a comma present in a number value will
likely break your SQL statement.

Apply the formatting on the read from the database, something like:

<@COLUMN "table.field" FORMAT="num:simple-integer">

Or use a "text" type field for storing your value, but then you won't be
able to query the field like a true number anymore.

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://xmlx.ca
403-281-6090 - [EMAIL PROTECTED]
--
Well-formed Development (for hire)
---------------------

> -----Original Message-----
> From: Bryan Hughes [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 04, 2003 12:51 PM
> To: [EMAIL PROTECTED]
> Subject: Witango-Talk: Format NUM
> 
> 
> I'm trying to format a number before insert into a database.
> 
> The input number would be something like "350,000".
> 
> <@VAR mynumber FORMAT="num:simple-integer">
> 
> But getting an error on execution: input text not valid, text not 
> formatted.
> 
> And the database action is getting an error because the comma in the 
> numbers throws off the number columns in the insert.
> 
> What does the error "input text not valid, text not formatted" mean, 
> what's causing it.
> 
> ______________________________________________________________
> __________
> TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
> 

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

Reply via email to