示例#1
0
        public FbParameter(
            string parameterName,
            FbDbType dbType,
            int size,
            ParameterDirection direction,
            bool isNullable,
            byte precision,
            byte scale,
            string sourceColumn,
#if !NETSTANDARD1_6
            DataRowVersion sourceVersion,
#endif
            object value)
        {
            ParameterName = parameterName;
            FbDbType      = dbType;
            Size          = size;
            _direction    = direction;
            _isNullable   = isNullable;
            _precision    = precision;
            _scale        = scale;
            _sourceColumn = sourceColumn;
#if !NETSTANDARD1_6
            _sourceVersion = sourceVersion;
#endif
            Value    = value;
            _charset = FbCharset.Default;
        }
示例#2
0
 public FbParameter()
 {
     this.fbDbType      = FbDbType.VarChar;
     this.direction     = ParameterDirection.Input;
     this.sourceVersion = DataRowVersion.Current;
     this.sourceColumn  = string.Empty;
     this.parameterName = string.Empty;
     this.charset       = FbCharset.Default;
 }
示例#3
0
 public FbParameter()
 {
     this.fbDbType = FbDbType.VarChar;
     this.direction = ParameterDirection.Input;
     this.sourceVersion = DataRowVersion.Current;
     this.sourceColumn = string.Empty;
     this.parameterName = string.Empty;
     this.charset = FbCharset.Default;
 }
示例#4
0
 public FbParameter()
 {
     _fbDbType              = FbDbType.VarChar;
     _direction             = ParameterDirection.Input;
     _sourceVersion         = DataRowVersion.Current;
     _sourceColumn          = string.Empty;
     _parameterName         = string.Empty;
     _charset               = FbCharset.Default;
     _internalParameterName = string.Empty;
 }
        public string GetCharsetString(FbCharset charset)
        {
            var dic = new Dictionary <FbCharset, string>
            {
                { FbCharset.Octets, "OCTETS" },
                { FbCharset.Ascii, "ASCII" },
                { FbCharset.UnicodeFss, "UNICODE_FSS" },
                { FbCharset.Utf8, "UTF8" },
                { FbCharset.ShiftJis0208, "SJIS_0208" },
                { FbCharset.EucJapanese0208, "EUCJ_0208" },
                { FbCharset.Iso2022Japanese, "ISO2022-JP" },
                { FbCharset.Dos437, "DOS437" },
                { FbCharset.Dos850, "DOS850" },
                { FbCharset.Dos865, "DOS865" },
                { FbCharset.Dos860, "DOS860" },
                { FbCharset.Dos863, "DOS863" },
                { FbCharset.Iso8859_1, "ISO8859_1" },
                { FbCharset.Iso8859_2, "ISO8859_2" },
                { FbCharset.Ksc5601, "KSC_5601" },
                { FbCharset.Dos861, "DOS861" },
                { FbCharset.Windows1250, "WIN1250" },
                { FbCharset.Windows1251, "WIN1251" },
                { FbCharset.Windows1252, "WIN1252" },
                { FbCharset.Windows1253, "WIN1253" },
                { FbCharset.Windows1254, "WIN1254" },
                { FbCharset.Big5, "BIG_5" },
                { FbCharset.Gb2312, "GB_2312" },
                { FbCharset.Windows1255, "WIN1255" },
                { FbCharset.Windows1256, "WIN1256" },
                { FbCharset.Windows1257, "WIN1257" },
                { FbCharset.Koi8R, "KOI8R" },
                { FbCharset.Koi8U, "KOI8U" },
                { FbCharset.None, "NONE" },
                { FbCharset.Default, "" }
            };

            return(dic[charset]);
        }
示例#6
0
 public FbParameter(
     string parameterName,
     FbDbType dbType,
     int size,
     ParameterDirection direction,
     bool isNullable,
     byte precision,
     byte scale,
     string sourceColumn,
     DataRowVersion sourceVersion,
     object value)
 {
     this.parameterName = parameterName;
     this.FbDbType      = dbType;
     this.Size          = size;
     this.direction     = direction;
     this.isNullable    = isNullable;
     this.precision     = precision;
     this.scale         = scale;
     this.sourceColumn  = sourceColumn;
     this.sourceVersion = sourceVersion;
     this.Value         = value;
     this.charset       = FbCharset.Default;
 }
 public async Task CreateDatabase(string path, FirebirdType type, FbCharset charset)
 {
     var dbInfo = new DatabaseInfo(new FirebirdInfo(path, type, charset));
     dbInfo.CreateDatabase();
     await LoadDatabase(dbInfo);
 }
示例#8
0
        public static FbParameter SetValue(this DbParameterCollection parameters, string parameterName, FbDbType dbType, FbCharset charset, int size)
        {
            var param = new FbParameter {
                ParameterName = parameterName, FbDbType = dbType, Charset = charset, Size = size
            };

            if (parameters.Contains(parameterName))
            {
                parameters.RemoveAt(parameterName);
            }

            parameters.Add(param);
            return(param);
        }
 public FirebirdInfo(string path, FirebirdType fbType, FbCharset charset)
 {
     _builder.Database = path;
     _builder.ClientLibrary = fbType == FirebirdType.Fb3 ? @"fb3\fbclient" : @"fb25\fbembed";
     _builder.Charset = new FbUtility().GetCharsetString(charset);
 }
 public FirebirdInfo(string path, FirebirdType fbType, FbCharset charset)
 {
     _builder.Database      = path;
     _builder.ClientLibrary = fbType == FirebirdType.Fb3 ? @"\fb3\fbclient" : @"fb25\fbembed";
     _builder.Charset       = new FbUtility().GetCharsetString(charset);
 }
示例#11
0
		public FbParameter(
			string parameterName,
			FbDbType dbType,
			int size,
			ParameterDirection direction,
			bool isNullable,
			byte precision,
			byte scale,
			string sourceColumn,
			DataRowVersion sourceVersion,
			object value)
		{
			this.parameterName = parameterName;
			this.FbDbType = dbType;
			this.Size = size;
			this.direction = direction;
			this.isNullable = isNullable;
			this.precision = precision;
			this.scale = scale;
			this.sourceColumn = sourceColumn;
			this.sourceVersion = sourceVersion;
			this.Value = value;
			this.charset = FbCharset.Default;
		}
示例#12
0
        public static FbParameter SetValue(this DbParameterCollection parameters, string parameterName, FbDbType dbType, FbCharset charset, int size)
        {
            var param = new FbParameter { ParameterName = parameterName, FbDbType = dbType, Charset = charset, Size = size };
            if (parameters.Contains(parameterName))
                parameters.RemoveAt(parameterName);

            parameters.Add(param);
            return param;
        }
示例#13
0
 public void CreateDatabase(string path, FirebirdType type, FbCharset charset)
 {
     _dbInfo = new DatabaseInfo(new FirebirdInfo(path, type, charset));
     _dbInfo.CreateDatabase();
     LoadDatabase(path);
 }
		public FbParameter()
		{
			_fbDbType = FbDbType.VarChar;
			_direction = ParameterDirection.Input;
			_sourceVersion = DataRowVersion.Current;
			_sourceColumn = string.Empty;
			_parameterName = string.Empty;
			_charset = FbCharset.Default;
			_internalParameterName = string.Empty;
		}