Escaping double quotes and/or semi-colons in connection string

Can someone show me a working example of a connection string that uses a password that contains a double quote (") and another example that has a password that contains a semi-colon.
I cannot get this to work and I can't find anything in the documentation.
Thanks.

You didn't say what part of the .NET documentation this came from. I tried this with ODP.NET and I was unable to get it to work.
Did you try it?
here are the same tests I've been trying. Can someone please provide me with a working example.
          static void Main(string[] args)
               OracleConnection oc=null;
               try
                    oc=new OracleConnection("User Id=tmoore2;Password=te\"st;Data Source=dev3;");
                    oc.Open();
                    Console.WriteLine("Success");
               catch(Exception ex)
                    Console.WriteLine(ex.Message);
               finally
                    if(oc!=null)
                         oc.Close();
                         oc.Dispose();
               try
                    Console.WriteLine("User Id=tmoore2;Password=te\\\"st;Data Source=dev3;");
                    oc=new OracleConnection("User Id=tmoore2;Password=te\\\"st;Data Source=dev3;");
                    oc.Open();
                    Console.WriteLine("Success");
               catch(Exception ex)
                    Console.WriteLine(ex.Message);
               finally
                    if(oc!=null)
                         oc.Close();
                         oc.Dispose();
               try
                    oc=new OracleConnection("User Id=tmoore2;Password=\"te\\\"st\";Data Source=dev3;");
                    oc.Open();
                    Console.WriteLine("Success");
               catch(Exception ex)
                    Console.WriteLine(ex.Message);
               finally
                    if(oc!=null)
                         oc.Close();
                         oc.Dispose();
               try
                    oc=new OracleConnection("User Id=tmoore2;Password='te\"st';Data Source=dev3;");
                    oc.Open();
                    Console.WriteLine("Success");
               catch(Exception ex)
                    Console.WriteLine(ex.Message);
               finally
                    if(oc!=null)
                         oc.Close();
                         oc.Dispose();
               try
                    oc=new OracleConnection("User Id=tmoore2;Password='te\\\"st';Data Source=dev3;");
                    oc.Open();
                    Console.WriteLine("Success");
               catch(Exception ex)
                    Console.WriteLine(ex.Message);
               finally
                    if(oc!=null)
                         oc.Close();
                         oc.Dispose();
               try
                    oc=new OracleConnection("User Id=tmoore2;\"Password=te\"st\";Data Source=dev3;");
                    oc.Open();
                    Console.WriteLine("Success");
               catch(Exception ex)
                    Console.WriteLine(ex.Message);
               finally
                    if(oc!=null)
                         oc.Close();
                         oc.Dispose();
               try
                    oc=new OracleConnection("User Id=tmoore2;\"Password=te\\\"st\";Data Source=dev3;");
                    oc.Open();
                    Console.WriteLine("Success");
               catch(Exception ex)
                    Console.WriteLine(ex.Message);
               finally
                    if(oc!=null)
                         oc.Close();
                         oc.Dispose();
          }

Similar Messages

  • Javax.mail.internet.AddressException how to escape double quote

    When I try and parse the following internetaddress:
    InternetAddress.parse("sevsev o'first sevsev o\"last <[email protected]>")I get the following stacktrace:
    Tomcat Log [(CKY50) 2006/09/27 15:26:29.217]: 4 Email.setReplyToAddresses() javax.mail.internet.AddressException: Missing '"' in string ``sevsev o'first sevsev o"last <[email protected]>'' at position 52
            at javax.mail.internet.InternetAddress.parse(InternetAddress.java:676)
            at javax.mail.internet.InternetAddress.parse(InternetAddress.java:529)
            at javax.mail.internet.InternetAddress.parse(InternetAddress.java:506)How do I escape the double quote? Thanks in advance!

    Thanks for the quick response, I tried that and got the same stacktrace:
    Tomcat Log [(3YVJS) 2006/09/27 15:44:38.554]: 4 Email.setReplyToAddresses() javax.mail.internet.AddressException: Missing '"' in string ``sevsev o'first sevsev o"last <[email protected]>'' at position 52
            at javax.mail.internet.InternetAddress.parse(InternetAddress.java:676)
            at javax.mail.internet.InternetAddress.parse(InternetAddress.java:529)
            at javax.mail.internet.InternetAddress.parse(InternetAddress.java:506)

  • Escape double quotes in replace formula in runcat.cmd

    Hi All,
    We are using command line (runcat.cmd) for search and replacing strings. I need to escape doble quotes from the formula. Please suggest a way to do it.
    For e.g,
    I want to replace
    <sawx:expr xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="xsd:string">May</sawx:expr>
    with
    <sawx:expr xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="xsd:string">Jun</sawx:expr>
    The complete string "<sawx:expr xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="xsd:string">May</sawx:expr>" is not working as we need to
    override the double quotes.
    If anyone has achieved this, please let us know.
    Thanks,
    Nithin

    Hi MK,
    We want to ensure that this replace does not have unnecessary impacts. i.e. if a column formula contains "May", it should not be changed.
    The no of such reports are huge, hence we can not go to each and every report and modify the XML.
    Any other ideas?
    Thanks,
    Nithin

  • Escape double quotes

    hey, how to escape the double quote in xml document?
    eg. for description="SHAFT X 10" "
    <xml_header id="0" action="Export" from_loc="KJA" to_loc="" doc_model="SpInventory" doc_key="" doc_ref_no="" done_by="j">
    <xml_header.items>
    <sp_inventory id="1028" description="SHAFT X 10" " category="BELL" />
    </xml_header.items>
    </xml_header>
    i write the XML file in this way:
    String exportFile = dir + rename(fileName);
                File file = new File(exportFile);
                PrintWriter fout = new PrintWriter(new FileWriter(file));
                ObjectXMLWriter writer = new ObjectXMLWriter(fout);
                writer.write(ob);
                fout.close();Pls help. Thanks.

    Sorry, wrong forum

  • Special double quotes and apostrophes in java help

    We are writing help for an application and using doctor help to generate it. The help is written in Word and converted to html. Word however, converts all the " characters to those "squiggly ones" which point towards the word they're quoting.
    When we viewed the generated help with java help those squiggly were not rendered. They are rendered as a square which means java help does not understand them.
    I'm sure someone else must have encountered this issue.
    Please can you tell me how to successfully render the squiggly double quotes in java help?

    You need the following encoding for those characters:
    &#8220;
    &#8221;
    using an xml encoder, e.g. xmlenc solves this issue, otherwise you must do it manually.
    But I have a related problem. When characters in the XML file are encoded
    they are only displayed correctly if some non encoded character follows.
    When there are two successive encoded characters then only the first one
    is displayed correctly. Putting a whitespace in between them displays both
    characters correctly, but with the whitespace in between.
    I guess there is an issue with the XML parser. Changing the encoding of the XML file does not help.
    example: TOC.xml file (displayed correctly in IE)
    <?xml version='1.0' encoding='ISO-8859-9' standalone='yes' ?>
    <!DOCTYPE toc PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp TOC Version 1.0//EN" "http://java.sun.com/products/javahelp/toc_1_0.dtd"><!--generated by JHelpDev Version: 0.4, 18 August 2005, see jhelpdev.sourceforge.net-->
    <toc version="1.0">
    <tocitem text="images "/>
    <tocitem text="&#286;&#286;RENC&#304; MOD&#220;L&#220; " target="index"/>
    </toc>
    Any ideas?

  • How to escape double quotes in database link login

    CREATE DATABASE LINK AA
    CONNECT TO NAME
    IDENTIFIED BY PASS"WORD
    USING "DOMAIN"
    given error of missing double quote identifier. already tried PASS\"WORD, 'PASS"WORD', \PASS"\WORD, \"PASS\"WORD, PASS+CHAR(34)+WORD. no luck.
    I am not in position to change the database password. It can be successfully connected without database link.
    Thanks for any comment.

    How about:
    begin
      execute immediate 'CREATE DATABASE LINK AA CONNECT TO NAME IDENTIFIED BY PASS"WORD USING "DOMAIN"';
    end;

  • What does the question mark and the semi-colon do in the following code

    public void set(int index, Object value) {
        int j;          // loop index
        int newLength;  // new size of array, if required
        if ( index < 0 )
          throw new ArrayIndexOutOfBoundsException(index);
        else {
          if ( index >= objs.length ) {
            resize(index) ;
          } // end if
          if ( index >= size ) {
            size = index + 1;
          objs[index] = ( value == null ? NULL_OBJ : value ) ;   } // end else
      } // end set

    Read about the ternary operator at http://java.sun.com/docs/books/tutorial/java/nutsandbolts/operators.html

  • Database link with the alias and full description in the connect string

    Hi,
    i have created database link with alias in tnsentry and full description
    and suppose i have removed the tnsnames.ora file what will be the impact on the database link that is whether database link will work or not i am sure db link created with alias won't work and how about db link created with full description and which one you prefer
    Thanks

    # Parameter file initora for Database prd
    ### Global database name is db_name.db_domain
    global_names = TRUE
    db_name = prd
    db_domain = world
    # TNSNAMES.ORA for prd ###############################
    prd.world = (DESCRIPTION = (ADDRESS = (COMMUNITY = tcp.world)
    (PROTOCOL = TCP) (Host = 100.10.100.1) (Port = 1521))
    (CONNECT_DATA = (SID = prd) (GLOBAL_NAME = prd.world)
    (SERVER = DEDICATED)))
    Our database link points from the local database test to the remote database prd. Therefore we need the global database name for prd. Ask the remote database administrator for these information or connect to prd and execute the following query on prd:
    SQL> select GLOBAL_NAME from GLOBAL_NAME;
    GLOBAL_NAME
    prd.WORLD
    CREATE DATABASE LINK prd
    CONNECT TO system IDENTIFIED BY system_passwd
    USING 'prd';--- alias
    so the connection description will be ---select ename from [email protected]
    useful link
    http://www.akadia.com/services/ora_dblinks.html

  • Double quotes in function and procedure names when using impdp

    When viewing a function in the original database, it looks like:
    CREATE OR REPLACE FUNCTION TA_ACTIVITY_D_GEN_FNC
    After doing an expdp and impdp to restore a development database, it now looks like
    CREATE OR REPLACE FUNCTION "TA_ACTIVITY_D_GEN_FNC"
    and also has 2 blank lines at end of function.
    This causes us problems when trying to use various utilites to compare differences in production and development. Now every function and procedure shows up as being different.
    Can someone please explain why and what can be done to avoid this from happening?
    Edited by: user6116705 on Jun 15, 2010 7:52 AM

    from old exp, here is the first line of the create procedure statement:
    CREATE FORMAT71 PROCEDURE "SECURE_DML"
    You can see the double quotes. I don't understand why you wouldn't see the same compare issue with old exp. I was wondering what you were using for compare since it would let me know where to look for anything that has changed from the original create to the create performed by data pump. I remember there being an issue in this area. I just don't remember if it was extra spacing, upcasing, or something else or multiple changes. You could contact Oracle support to see if there is a fix and if it is backported to your version.
    The only other way you can possibly fix this (and it would be a huge pain) would be to run impdp with a sqlfile and then edit the sqfile to remove the double quotes and to remove any extra spacing/extra lines. A patch from Oracle would certainly be easier if one was available.
    Dean

  • Double Quotes in MaxL Strings

    I am trying to pass in a calc script string from a Perl script to a MaxL script. The calc script needs double quotes around some of the member names (yes, I know I can create aliases with underscores to work around this, but I can't believe this isn't possible). I can escape the double quote characters in Perl, no problem. But the double quotes just get stripped by MaxL. Here is an example:<BR><BR>MAXL> echo 'I am "quoting" this';<BR><BR>I am "quoting" this<BR><BR>MAXL> set X = 'I am "quoting" this';<BR><BR>MAXL> echo $X;<BR><BR>I am quoting this<BR><BR>MAXL><BR><BR>There is nothing in the docs about escaping double quote characters. I've tried using backslash, no luck there. I've tried using double double quotes and they all get stripped. I've tried doing this inside single quoted strings and double quoted strings - no joy whatsoever. The funny thing is the example above, where simply echoing the literal string works, but assigning it to a variable strips out the double quotes.<BR><BR>Does anyone know how to get double quotes into a MaxL string variable? There has to be a way...<BR><BR>Thanks,<BR><BR>James

    Yes, I've dealt with enclosing variables in double quotes in order for MaxL to parse them properly, but what I'm trying to do is use a variable that contains a double quote. Such as:<BR><BR> set QuoteVar = 'I am "quoting" this';<BR><BR>I'm trying to set substitution variables via MaxL, and some of my existing sub vars have double quotes in them so that they can be used to store member names that appear in calc scripts. As I said, I know I can accomplish this with an alias table that creates a version of the member name that doesn't need quotes, but that's a whole deal to maintain just for this one thing and it seems overly burdensome for such a simple task.<BR><BR>Also, as I said, MaxL does fine with double quotes in literal strings, it's only when assigned to variables that it always strips them out. I want to create a relatively generic script for setting sub vars, so I need to pass variables around. Just calling MaxL from Perl and passing in parameters that get converted to $1, $2, etc. causes these double quotes to get stripped.<BR><BR>So, is there any way around this?<BR><BR>Thanks,<BR><BR>James

  • Loading csv file trying to replace double quotes

    Hi, I am trying to load a csv file with a field with double qoutes that I want to replace the double qoutes to one. The CSV file I will enter
    "TEST,2345" in a field and when it loads its as ""TEST,2345""
    So I got this code to handle it.
    Pattern quotesRegex = Pattern.compile("\"\"");
              Matcher m = fieldRegex.matcher(line);
              while (m.find()) {
                   String field;
                   if (m.group(1) != null) {
                        // If a quoted string was matched replace escaped double quote,
                        // "" with "
                        field = quotesRegex.matcher(m.group(1)).replaceAll("\"");
    else {
                        field = m.group(2);
                   fields.add(field.trim());
    I want to change a line like this
    D,,""TEST,2345"",46,,
    to
    D,,"TEST,2345",46,,
    but afterwards nothing has changed the record looks as below
    D,,""TEST,2345"",46,,
    Whats wrong with this?
    thanks

    I simply created a simple csv file with one field that I entered a double qoute of "TEST,2345"
    Later when reading in the file(using the code I pasted in) I can inspect it and its """TEST,2345"""
    The relaceAll doesnt seem to change anything(nor did my code). So I was stumped. thanks

  • Regular Expression: Extract Subgroup Content between Double Quotes

    I am using java Pattern and Matcher to match the content between the double quotes. But the result is not what I expected.
    Here are some of my code:
    String s="\"C:\abc\"'; //notice the inside double quotes are escaped double quotes.
    Pattern p= Pattern.compile("\"(.+)\"");
    Matcher m=p.matcher(s);
    if(m.matches()){....}
    Result====:
    m.groupCount()=1,
    m.group(0)="C:\abc"
    But what I want is C:\abc instead of "C:\abc". I am also confused about the group number. If group(0) matches the whole string implicitly, group(1) should represent the subgroup (.+) in the above example, right? Thanks.

    Hi,
    You probably have another error in your code.
    Execute this.
    class Test {
        public static void main(String[] args) {
            String s= "\"C:\\abc\"";
            Pattern p= Pattern.compile("\"(.+)\"");
            Matcher m=p.matcher(s);
            if(m.matches()){
                System.out.println(m.groupCount());
                System.out.println(m.group(0));
                System.out.println(m.group(1));
    }It prints
    1
    "C:\abc"
    C:\abc/Kaj

  • Replacing " (double quote) with ' (single quote)

    Hi there,
    I have the following method to manipulate user input. All I want to do is, to replace the double quote with a single quote. The implementation I tried was,
    this.replace(desc, "\"", "'");
    This does not work for me. It jsut removes the double quote and does not introduces the single quote. Could any one please advise?
    Thanks,
    Des
    public static String replace(String line, String oldString, String newString) {
              if(line != null && oldString != null && newString != null) {
                   int index = 0;
                   while ((index = line.indexOf(oldString, index)) >= 0) {
                        line = line.substring(0, index) +
                             newString +
                             line.substring(index + oldString.length());
                        index += newString.length();
              return line;
         }

    Bad luck.. I am unable to get it still.
    This is the code I am using (implemetation is in a JSP. I am using this code to test it).
    public class Test{
    public static void main(String args[]){
         String s = args[0];
         Test t = new Test();
         String doubleQuote = "\"";
         System.out.println(" output :"+ t.replace(s,doubleQuote,"'"));
         //System.out.println(" output :"+ t.replace(s,"\"","'"));
         //System.out.println(" output :"+ t.replace('"', '\''));
    public static String replace(String line, String oldString, String newString) {
              if(line != null && oldString != null && newString != null) {
                   int index = 0;
                   while ((index = line.indexOf(oldString, index)) >= 0) {
                             System.out.println(" line count :");
                        line = line.substring(0, index) +
                             newString +
                             line.substring(index + oldString.length());
                        index += newString.length();
              return line;
    }mshn02
    The main problem is I am stuck with the server's version of Java (which I have no control on it). I could not use 1.4.2

  • Double quotes missing in CSV file but exist in text file from AL11

    Hi I am sending a file to AL11 with one of the fields having double quotes Like "field value" . When i download into Text file  i am seeing the quotes but not when download as CSV file from Al11. Any SAP notes for this . If i add  multiple quotes ' """" ' to have in csv I am seeing more quotes in text file which is not accepted . Please reply if anyone worked on this before . Thanks Kamesh

    The CSV file also has the quotes (check in notepad), but when opened in MS Excel, Excel has a feature to ignore double quotes and consider the comma inside the quotes as part of field, not as a field separator.

  • How to handle ' " '(double quotes) in .csv file during migration

    I am facing problem in migrating data from sql server 2000 into oracle via .csv file using sql loader.
    1>How should i migrate the string which contains ' " ' (double quotes) characters,
    as i am enclosing the string in ' " ' in .ctl file (enclosed by ' " ').
    is there any syntax in the control file which can migrate the ' " '(double quotes) as it is as the data in the files is 50000 records .?
    Thank you..

    Yes this is correct.
    but problem will occur when e.g check the foll. string.
    (1001,And I quote "This, will work")
    Here it is a comm(,) in b/w "This and will".
    due to this sqlldr interpret it as end of field. and throws an error.
    I had gone through expert one on one oracle, what it maintioned as,
    put an extra double quotes( " ) like " " to enclosed the double quoted string.
    This works fine. For small data it can be done manually.
    But for large data what condition can be put in the ctl file to achieve this?
    or is there any other way to achieve this?
    Thank you.

Maybe you are looking for

  • Unable to update design in InCopy

    Hello All, I am running InDesign CS5 on a mac, and my copy team has InCopy CS5 on their PCs. We are working on a layout that had elements on the page that were not made into assignments and not intended for the copy team to edit. After a round with t

  • An unknown error has occurred (-50)

    The pop up states 'There was a problem downloading "Miss Congeniality". An unknown error occured (-50). Please check that the connection to the network is active and try again.' The network is connected because I am online posting this message, the i

  • Playback after slideshow is burned using iDVD produces random pauses

    Every time I burn a slideshow project using iDVD, the playback, whether it be on the Mac or on a generic DVD player, produces a momentary pause somewhere. I burned the same project several times in order to pinpoint the error, however the pause does

  • Error message: "sending the message content to the server failed"

    Not sure what I did, but when I try to send email (yahoo account) I receive the following: "A copy has been placed in your Outbox.  Sending the message content to the server failed.  I am still able to receive messages." How can I correct this?

  • I would like to cancel my CC membership

    I need help cancelling my CC membership but would like to just have CS6 Ai.