.NETGURU
Access edit
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.aspnet.

Post a new message to this list...

Graeme
Hello

I think I need square brackets around the text I'm trying to write to
Access, but can't figure how/where to include them in this Update statement
....

Dim myUpdateCommand As New OleDbCommand("UPDATE edUsers SET Administrator =
'" & TextBox12.Text & "' WHERE ID = " & Label58.Text, myConnect)

Sometimes Textbox12 contains two separated words hence my thought that I
should include sq bkts (else it fails), or is there another way? How do I
overcome this please?

Thanks
Graeme

Reply to this message...
 
    
Graeme
Further to my query below, one answer is to use "" to replace each '. But
this then leaves a similar problem if user types " in the textbox.
"Graeme" <Click here to reveal e-mail address> wrote in message
news:%Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Greg Burns
Most people aren't going to see your original post becuase it was dated 4
years ago.

The short answer is: use parameters

Greg

"Graeme" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Graeme
So THAT's why I couldn't find it! Since fixed clock after bios jumper reset.
Anyway, thanks. I was going to convert to parameters anway (getting
unwieldy) but didn't realise I could also fix speech things. Thanks for your
help!

"Greg Burns" <Click here to reveal e-mail address> wrote in message
news:%Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Graeme
sorry - meant to say I am trying to include speech marks (') in text of
Text12.Text. Nothing to do with separated words at all ... almost midnight
here and I should go to bed!
"Graeme" <Click here to reveal e-mail address> wrote in message
news:%Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
 
System.Data.OleDb.OleDbCommand




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification