Example #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 );
 }
Example #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));
        }
Example #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);
        }