[AccessD] SQL statement

Kim Wiggins kimjwiggins at yahoo.com
Fri Aug 5 10:06:08 CDT 2005


I'm sorry John, I didn't explain that well.  It is Quantity1, etc....  The (i) is the index in my program for me to loop through the fields.

"John W. Colby" <jwcolby at colbyconsulting.com> wrote:Kim,

It is considered "bad practice" to
use "special characters" in field names. Basically only alpha characters
and numbers should be used. Thus in your case, Quantity1 (or QuantityI)
would be a better name.

Special characters can cause unintended interactions with the VBA compiler
as well as the SQL parsing. They force the developer to take extra steps to
"wrap" such field names to prevent such interactions.

John W. Colby
www.ColbyConsulting.com 

Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kim Wiggins
Sent: Friday, August 05, 2005 9:10 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] SQL statement


Well yes, I do have a field called quantity(i) because I have fields that
correspond to parts that are 1-8. Thanks, I didn't see that space.

Stuart McLachlan wrote:On 4 Aug 2005 at 19:29, Kim
Wiggins wrote:

> My application is telling me something is wrong with this sql 
> statement for my Access database. Can anyone figure out what's wrong? 
> I don't see anything. strSQL1 = "update tblRepairPartsReplaced set 
> quantity (i) = '" & Val(txtQty(i)) & "' Where part_no = '" & 
> txtPartsRep(i).Text & "'" Thanks Kim
> 


There is a space between quantity and (i). Having said that, do you really 
have a field called "quantity(i)" ?

I'd guess you just want ...quantity = '" & .....




-- 
Stuart


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


		
---------------------------------
 Start your day with Yahoo! - make it your home page 


More information about the AccessD mailing list