Thanks, David...good idea...I'll do that. (What's one more syntax consideration at this point, eh?<g>)
Dian ~ -----Original Message----- From: David Smart [mailto:[EMAIL PROTECTED] Sent: Friday, March 18, 2005 3:39 AM To: [email protected] Subject: Re: [ASP] Arrgghhh...quotes again! Square brackets. Actually, you should be using them around every field name, whether it has spaces or not. It's a good habit to get into. As well as spaces, it'll protect you against problems where field names are the same as keywords. > gstrSQLQuery = "SELECT * FROM [tbl_client] WHERE [Client Last Name] = '" & > strLName & "'" Dave S ----- Original Message ----- From: "Dian D. Chapman" <[EMAIL PROTECTED]> To: "Group - ASP" <[email protected]> Sent: Friday, March 18, 2005 6:08 PM Subject: [ASP] Arrgghhh...quotes again! > > Would someone please be so kind to tell me how to handle a field name with > spaces!<sigh> > > I'm trying to connect to a client's DB and they used spaces in their field > names. I've tried a dozen combinations and I keep getting a syntax error. > > gstrSQLQuery = "SELECT * FROM tbl_client WHERE Client Last Name = '" & > strLName & "'" > > I end up with > > Run-time error '-2147217900 (80040e14)': > > Syntax error (missing operator) in query expression 'Client Last Name = > 'chapman''. > > I've tried quotes all over the place and can't get the @#$%^! thing right. > > TIA... > Dian ~ > --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [email protected] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Links -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 3/15/2005 -- This email scanned and certified clean by AVG! Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 3/15/2005 --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [email protected] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/active-server-pages/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
