Esempio n. 1
0
 public String GetConnectionItem( String connectionString, ConnectionItemType connectionItem ) {
     String str = connectionItem.ToString().ToLower().Replace( "userid", "uid" ).Replace( "password", "pwd" );
     String[] strArray = connectionString.ToLower().Split( new char[] { ';' } );
     foreach (String item in strArray) {
         if (item.Trim().ToLower().StartsWith( str ))
             return item.Replace( str, "" ).Replace( "=", "" ).Replace( " ", "" );
     }
     return null;
 }
Esempio n. 2
0
 public String GetConnectionItem( String connectionString, ConnectionItemType connectionItem ) {
     String str = connectionItem.ToString().ToLower().Replace( "database", "data source" ).Replace( "userid", "user id" );
     String[] arrItem = connectionString.ToLower().Split( new char[] { ';' } );
     foreach (String item in arrItem) {
         if (item.Trim().ToLower().StartsWith( str ))
             return item.Replace( str, "" ).Replace( "=", "" ).Replace( " ", "" );
     }
     return null;
 }
Esempio n. 3
0
        public String GetConnectionItem(String connectionString, ConnectionItemType connectionItem)
        {
            String str = connectionItem.ToString().ToLower().Replace("database", "data source").Replace("userid", "user id");

            String[] arrItem = connectionString.ToLower().Split(new char[] { ';' });
            foreach (String item in arrItem)
            {
                if (item.Trim().ToLower().StartsWith(str))
                {
                    return(item.Replace(str, "").Replace("=", "").Replace(" ", ""));
                }
            }
            return(null);
        }
Esempio n. 4
0
        public String GetConnectionItem(String connectionString, ConnectionItemType connectionItem)
        {
            String str = connectionItem.ToString().ToLower().Replace("userid", "uid").Replace("password", "pwd");

            String[] strArray = connectionString.ToLower().Split(new char[] { ';' });
            foreach (String item in strArray)
            {
                if (item.Trim().ToLower().StartsWith(str))
                {
                    return(item.Replace(str, "").Replace("=", "").Replace(" ", ""));
                }
            }
            return(null);
        }