예제 #1
0
파일: AccessDialect.cs 프로젝트: jmyd/oms
 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);
        }