Home All Groups Group Topic Archive Search About

how to make string containing " ?

Author
16 Oct 2006 3:09 PM
bob
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

Author
16 Oct 2006 3:15 PM
Miro
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
>
>
Author
16 Oct 2006 3:23 PM
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
>>
>>
>
>
Author
16 Oct 2006 3:36 PM
Steve Long
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
>>>
>>>
>>
>>
>
>
Author
16 Oct 2006 5:09 PM
GhostInAK [Bastard]
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
Author
16 Oct 2006 6:55 PM
Steve Long
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
>
>
Author
16 Oct 2006 4:01 PM
Peter Macej
> I foun dit:
> just double " in the string

Yes, "" is an escape sequence for " in VB strings. I wrote a macro that
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
Author
16 Oct 2006 6:16 PM
Smokey Grindle
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
>
>