SQL Update Stement

R

rcmb25

I have a form that retrieves data from a SQL database. I use this form to allow personnel to update data in the database. When the user clicks submit I want my UPDATE statement to do the following

UPDATE Table SET LastName='::LastName::', FirstName='::FirstName::', MidName='::MidName::', Street='::Street::',City='::City::', CommInfo='::LastName::/::FirstName::/::MidName::' WHERE ID = ::ID:

When I view what has been submitted I see the following for CommInfo field in the databas

LastName/::FirstName::/::MidName:: instead of the contents of the FirstName and MidName form boxes (it actually inserts the users LastName first so that part is working)

When I submit to an access database all works fine and the correct information is stored. When I submit to SQL I get the example I provided above. I am using FP2003

Any ideas on how I can change the UPDATE statement to properly record the information I desire?
 
J

Jim Buyens

Try

CommInfo='::LastName::' & '/' & '::FirstName::' & '/'
& '::MidName::'

However, my *real* suggestion is to elimiante the CommInfo
field compeltely, and instead create a View that
calculates that field on the fly.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------


-----Original Message-----
I have a form that retrieves data from a SQL database. I
use this form to allow personnel to update data in the
database. When the user clicks submit I want my UPDATE
statement to do the following:
UPDATE Table SET LastName='::LastName::',
FirstName='::FirstName::', MidName='::MidName::',
Street='::Street::',City='::City::',
CommInfo='::LastName::/::FirstName::/::MidName::' WHERE ID
= ::ID::
When I view what has been submitted I see the following
for CommInfo field in the database
LastName/::FirstName::/::MidName:: instead of the
contents of the FirstName and MidName form boxes (it
actually inserts the users LastName first so that part is
working).
When I submit to an access database all works fine and
the correct information is stored. When I submit to SQL I
get the example I provided above. I am using FP2003.
Any ideas on how I can change the UPDATE statement to
properly record the information I desire?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top