Title: Message

And it worked. Thank you.

 

-----Original Message-----
From: Niall Merrigan [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 8:12 AM
To: [EMAIL PROTECTED]
Subject: RE: Witango-Talk: updating a field whose name contains a space

 

Try this

 

Use a direct DBMS for your SQL for this

 

[Home Address] syntaxed as such should work

 

eg SELECT * FROM tbl WHERE [Home Address] = 'test';

 

HTH

Niall

 

 

 

 

 

-----Original Message-----
From: Barbara McCormick [mailto:[EMAIL PROTECTED]
Sent: 11 December 2003 15:48
To: [EMAIL PROTECTED]
Subject: RE: Witango-Talk: updating a field whose name contains a space

The problem here is that I didn’t create the table.  If I really need to change the field name I’ll have to investigate and find everywhere it’s referenced. IF that’s what I have to do, that’s what I have to do, I guess.

 

-----Original Message-----
From: Jim Kass [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 5:08 PM
To: [EMAIL PROTECTED]
Subject: RE: Witango-Talk: updating a field whose name contains a space

 

Barbara,

 

Is there a reason that the field NAME contains a space?  If not, then just change it to "HomeAddress".  I'm not sure how you put a space in the column name, but my guess is that standard SQL will interpret it as an alias... i.e.

 

SELECT home address FROM sometable

 

is the same as saying:

SELECT home AS address FROM sometable

 

The "address" is actually being used as an alias.

 

So in your update statement:

UPDATE sometable SET home address='somevar' WHERE someid=xx

 

SQL will complain that the syntax is wrong, because you cannot use an alias.

 

oh, and if you put quotes around it... it will be interpreted as a string so:

SELECT 'home address' FROM sometable

 

will just give you a bunch of results with 'home address' in them.

 

Hope that helps!

 

Jim Kass
Web Developer

--
Forestweb: The Source for Industry Intelligence
Best Content -- Most Relevant -- Best Delivery
http://www.forestweb.com
(310) 553 - 0008

-----Original Message-----
From: Jason Schulz [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 4:51 PM
To: [EMAIL PROTECTED]
Subject: Re: Witango-Talk: updating a field whose name contains a space

If the update action isn't quoting the field name, you may need to write a custom SQL action for the update so that you can explicitly quote the field name.

J.
On Thursday, Dec 11, 2003, at 10:50 Australia/Sydney, Barbara McCormick wrote:

Hello,

I have Witango 5 application that displays data from a table using the results from a search action in a form. One of the field names in this table contains a space: ‘Home Address’. The data displays correctly, but won’t update. I get an invalid syntax error on that field.

I’ve dragged that field over from the table(under datasources) into an update action. If I view that update as a SQL query, the statement in questions appears  as 

 home Address='<@arg homeaddress>'  

 

In debug, I get an invalid syntax error and this is how the field displays in the query statement

  
Address='30024 Live Oak Trail'

How do I get this field name quoted in an Update Action, so it will recognize the space in the field name?

Thank you very much.

 

Barbara McCormick

Capital Pacific Homes, Inc.

[EMAIL PROTECTED]

480-777-2400 ext 211

 



WITH IMAGINATION
Planning, Implementation and Management of Web Applications

160 Pacific Highway North Sydney NSW Australia 2060
phone + 612 9929 9229 fax + 612 9460 4770 
web - www.wi.com.au email - [EMAIL PROTECTED]

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



********************************************************************
This message is intended only for the use of the person(s) ("the intended
recipient(s)") to whom it is addressed. It may contain information which is
privileged and confidential within the meaning of applicable law. If you
are not the intended recipient, please contact the sender as soon as
possible. The views expressed in this communication may not necessarily
be the views held by LGCSB (Local Government Computer Services Board).

Any attachments have been checked by a virus scanner and appear to be
clean.
Please ensure that you also scan all messages, as LGCSB does not accept
any liability for contamination or damage to your systems.
********************************************************************

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

Reply via email to