none
Variable mit Sonderzeichen füllen RRS feed

  • Frage

  • Hallo,

    folgendes Problem: Ich muss eine Variable mit einem String der die zeichen %" beinhaltet füllen (Bsp: if "%clientname%"==" ).

    Die Hochkammas werden dann als Ende des Textes interpretiert und % als ungültiges Zeichen.

    Gibt es eine Möglichkeit Dieses zu umgehen?

    Gruß

    Armin

    Donnerstag, 30. Juni 2011 08:18

Antworten

  • Hi,

    sorry for my reply in english, my german is not that good;

    if you want to escape a double quote character in vb, just use a double double qoute like this:

    "%clientname%""=="


    Regards, Nico
    • Als Antwort markiert AucheinName Donnerstag, 30. Juni 2011 09:01
    Donnerstag, 30. Juni 2011 08:31

Alle Antworten

  • Hi,

    sorry for my reply in english, my german is not that good;

    if you want to escape a double quote character in vb, just use a double double qoute like this:

    "%clientname%""=="


    Regards, Nico
    • Als Antwort markiert AucheinName Donnerstag, 30. Juni 2011 09:01
    Donnerstag, 30. Juni 2011 08:31
  • Hi Nico,

    perfekt, i had to set the variables like this:

            Dim var1 As String
            Dim var2 As String
            Dim var3 As String
            var1 = """%clientname%"""
            var2 = "=="""
            var3 = var1 + var2

     

    Thanks

    Armin

    Donnerstag, 30. Juni 2011 09:02