示例#1
0
 public static String MapPath( String connectionString ) {
     if (SystemInfo.IsWeb==false)
         return connectionString;
     String connectionItem = new AccessDialect().GetConnectionItem( connectionString, ConnectionItemType.Database );
     String newValue = PathHelper.Map( connectionItem );
     return connectionString.Replace( connectionItem, newValue );
 }
示例#2
0
        public static String MapPath(String connectionString)
        {
            if (SystemInfo.IsWeb == false)
            {
                return(connectionString);
            }
            String connectionItem = new AccessDialect().GetConnectionItem(connectionString, ConnectionItemType.Database);
            String newValue       = PathHelper.Map(connectionItem);

            return(connectionString.Replace(connectionItem, newValue));
        }
示例#3
0
 public override Object SetParameter( IDbCommand cmd, String parameterName, Object parameterValue ) {
     parameterValue = base.processValue( parameterValue );
     parameterName = new AccessDialect().GetParameterAdder( parameterName );
     IDbDataParameter parameter;
     if (parameterValue is DateTime) {
         parameter = new OleDbParameter( parameterName, parameterValue.ToString() );
     }
     else {
         parameter = new OleDbParameter( parameterName, parameterValue );
     }
     cmd.Parameters.Add( parameter );
     return parameterValue;
 }
示例#4
0
        public override Object SetParameter(IDbCommand cmd, String parameterName, Object parameterValue)
        {
            parameterValue = base.processValue(parameterValue);
            parameterName  = new AccessDialect().GetParameterAdder(parameterName);
            IDbDataParameter parameter;

            if (parameterValue is DateTime)
            {
                parameter = new OleDbParameter(parameterName, parameterValue.ToString());
            }
            else
            {
                parameter = new OleDbParameter(parameterName, parameterValue);
            }
            cmd.Parameters.Add(parameter);
            return(parameterValue);
        }