|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to make string containing " ?Hi,
I need to make a string containing this text litterally as it:: selectcommand="select * from table where field1=' " & myvar & " ' " Dim st as string st="selectcommand=" & ??? How can i include " in the string without it is interpreting as a string delimiter? Thanks bob have you tried to use the char value?
Show quoteHide quote "bob" <sd***@sds.dfg> wrote in message news:em7SXUT8GHA.3620@TK2MSFTNGP04.phx.gbl... > Hi, > > I need to make a string containing this text litterally as it:: > selectcommand="select * from table where field1=' " & myvar & " ' " > > Dim st as string > st="selectcommand=" & ??? > > How can i include " in the string without it is interpreting as a string > delimiter? > > Thanks > bob > > I foun dit:
just double " in the string Show quoteHide quote "Miro" <miron***@golden.net> schreef in bericht news:ea0lOWT8GHA.4288@TK2MSFTNGP02.phx.gbl... > have you tried to use the char value? > > > > "bob" <sd***@sds.dfg> wrote in message > news:em7SXUT8GHA.3620@TK2MSFTNGP04.phx.gbl... >> Hi, >> >> I need to make a string containing this text litterally as it:: >> selectcommand="select * from table where field1=' " & myvar & " ' " >> >> Dim st as string >> st="selectcommand=" & ??? >> >> How can i include " in the string without it is interpreting as a string >> delimiter? >> >> Thanks >> bob >> >> > > Bob,
I think the standard way to do this is: & Char(66) Show quoteHide quote "bob" <sd***@sds.dfg> wrote in message news:uCfDHcT8GHA.2092@TK2MSFTNGP03.phx.gbl... >I foun dit: > just double " in the string > "Miro" <miron***@golden.net> schreef in bericht > news:ea0lOWT8GHA.4288@TK2MSFTNGP02.phx.gbl... >> have you tried to use the char value? >> >> >> >> "bob" <sd***@sds.dfg> wrote in message >> news:em7SXUT8GHA.3620@TK2MSFTNGP04.phx.gbl... >>> Hi, >>> >>> I need to make a string containing this text litterally as it:: >>> selectcommand="select * from table where field1=' " & myvar & " ' " >>> >>> Dim st as string >>> st="selectcommand=" & ??? >>> >>> How can i include " in the string without it is interpreting as a string >>> delimiter? >>> >>> Thanks >>> bob >>> >>> >> >> > > Hello Steve,
I believe you mean 34. -Boo Show quoteHide quote > Bob, > I think the standard way to do this is: > & Char(66) > "bob" <sd***@sds.dfg> wrote in message > news:uCfDHcT8GHA.2092@TK2MSFTNGP03.phx.gbl... > >> I foun dit: >> just double " in the string >> "Miro" <miron***@golden.net> schreef in bericht >> news:ea0lOWT8GHA.4288@TK2MSFTNGP02.phx.gbl... >>> have you tried to use the char value? >>> >>> "bob" <sd***@sds.dfg> wrote in message >>> news:em7SXUT8GHA.3620@TK2MSFTNGP04.phx.gbl... >>> >>>> Hi, >>>> >>>> I need to make a string containing this text litterally as it:: >>>> selectcommand="select * from table where field1=' " & myvar & " ' " >>>> >>>> Dim st as string >>>> st="selectcommand=" & ??? >>>> How can i include " in the string without it is interpreting as a >>>> string delimiter? >>>> >>>> Thanks >>>> bob Opps. :)
Show quoteHide quote "GhostInAK [Bastard]" <p***@paco.net> wrote in message news:be1391bf1cf4a8c8bf19f4a3d9ce@news.microsoft.com... > Hello Steve, > > I believe you mean 34. > > -Boo > >> Bob, >> I think the standard way to do this is: >> & Char(66) >> "bob" <sd***@sds.dfg> wrote in message >> news:uCfDHcT8GHA.2092@TK2MSFTNGP03.phx.gbl... >> >>> I foun dit: >>> just double " in the string >>> "Miro" <miron***@golden.net> schreef in bericht >>> news:ea0lOWT8GHA.4288@TK2MSFTNGP02.phx.gbl... >>>> have you tried to use the char value? >>>> >>>> "bob" <sd***@sds.dfg> wrote in message >>>> news:em7SXUT8GHA.3620@TK2MSFTNGP04.phx.gbl... >>>> >>>>> Hi, >>>>> >>>>> I need to make a string containing this text litterally as it:: >>>>> selectcommand="select * from table where field1=' " & myvar & " ' " >>>>> >>>>> Dim st as string >>>>> st="selectcommand=" & ??? >>>>> How can i include " in the string without it is interpreting as a >>>>> string delimiter? >>>>> >>>>> Thanks >>>>> bob > > > I foun dit: Yes, "" is an escape sequence for " in VB strings. I wrote a macro that > just double " in the string allows you pasting any text (even very long multi-line) as VB string: http://www.helixoft.com/blog/archives/12 -- Peter Macej Helixoft - http://www.helixoft.com VSdocman - Commenter and generator of class documentation for C#, VB ..NET and ASP .NET code double quotes
selectcommand="select * from table where field1=""" & myval & """ Show quoteHide quote "bob" <sd***@sds.dfg> wrote in message news:em7SXUT8GHA.3620@TK2MSFTNGP04.phx.gbl... > Hi, > > I need to make a string containing this text litterally as it:: > selectcommand="select * from table where field1=' " & myvar & " ' " > > Dim st as string > st="selectcommand=" & ??? > > How can i include " in the string without it is interpreting as a string > delimiter? > > Thanks > bob > >
Performance of Queue(of T).Enqueue(T)
How to convert a Byte() to an IntPtr in VB load form in vb.net How to raise a shortcut picking off each digit of an integer How to use binary files as resources in VB 2005 Regex.Split... Can I do this?? control array with code added controls Getting external IP Address Is there a equivalent to 'Last Position' in VS2005? |
|||||||||||||||||||||||