i have a problem ! i try to insert/update a db msi => microsoft windows installer !
i must to enter two ' quote !!!
but after several test nothing can be entered in this db i've try this
" '' "
or
" '''' " or use replace or escape with \ or / but when i test the application fail with the return execute param !
here is it a simple of code :
doubleQuote = "''"
qLangue = "UPDATE Property set Property.Value = '" & doubleQuote & "' WHERE Property.Property = 'LANG'"
I can use dataset or bindingsource because i use vb net 1.1 and com
someone can have several idea for to help me i've just to insert two quote '' without text !
Thanks and sorry for my bad english
Christophe
Scott LyslePosted Mar 13, 2007, 10:28 AM
Just for the heck of it, put breakpoint on your sql string or put it into a message box and display it before you execute it. Check the format of that string to make sure that it is what you think it should be once it is constructed in the application.
christophe bernardPosted Mar 13, 2007, 3:33 AM
hi slysle ,
my query is true i think i use correct simple quote, quote , ampersant, variable and son on !
but when i try to enter for my variable two quote the query failed with invalid argument i think vb net think my two quote are a comment !!!!!!
i ve try to use replace or \ or / or double my quote or four my quote but impossible to enter two single quote in a MSI DATABASE !
if you have some others idea i m ok ;-)
Have a nice day
Christophe
sorry for my bad english
Scott LyslePosted Mar 12, 2007, 11:00 PM
I'm not sure that I follow you but if you are trying to write a VB.NET update statement using dynamic SQL, it should look something like this: (single quote, quote, ampersand, variable, ampersand, quote, single quote)
"UPDATE Sensors SET SensorStatus = '" & strTemp & "' WHERE SensorID = '" & strSensor & "'"