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




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com