diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
index d51d6be457..863600386c 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
@@ -327,6 +327,9 @@
Resources\ResCategoryAttribute.cs
+
+ Resources\ResDescriptionAttribute.cs
+
@@ -829,7 +832,6 @@
-
TrueTrue
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs
index 2d36d0812d..5329d1ff08 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs
@@ -6,6 +6,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Data.SqlTypes;
@@ -24,6 +25,10 @@
namespace Microsoft.Data.SqlClient
{
///
+ [DefaultEvent("RecordsAffected")]
+ [ToolboxItem(true)]
+ [DesignerCategory("")]
+ // TODO: Add designer attribute when Microsoft.VSDesigner.Data.VS.SqlCommandDesigner uses Microsoft.Data.SqlClient
public sealed partial class SqlCommand : DbCommand, ICloneable
{
private static int _objectTypeCount; // EventSource Counter
@@ -423,6 +428,11 @@ private SqlCommand(SqlCommand from) : this()
}
///
+ /// [
+ [DefaultValue(null)]
+ [Editor("Microsoft.VSDesigner.Data.Design.DbConnectionEditor, " + AssemblyRef.MicrosoftVSDesigner, "System.Drawing.Design.UITypeEditor, " + AssemblyRef.SystemDrawing)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Data)]
+ [ResDescription(StringsHelper.ResourceNames.DbCommand_Connection)]
new public SqlConnection Connection
{
get
@@ -499,6 +509,8 @@ private SqlInternalConnectionTds InternalTdsConnection
private static bool IsRetryEnabled => LocalAppContextSwitches.IsRetryEnabled;
///
+ [Browsable(false)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public SqlRetryLogicBaseProvider RetryLogicProvider
{
get
@@ -516,6 +528,10 @@ public SqlRetryLogicBaseProvider RetryLogicProvider
}
///
+ [Browsable(false)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] // MDAC 90471
+ [ResCategory(StringsHelper.ResourceNames.DataCategory_Notification)]
+ [ResDescription(StringsHelper.ResourceNames.SqlCommand_Notification)]
public SqlNotificationRequest Notification
{
get
@@ -547,6 +563,9 @@ internal SqlStatistics Statistics
}
///
+ [Browsable(false)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ [ResDescription(StringsHelper.ResourceNames.DbCommand_Transaction)]
new public SqlTransaction Transaction
{
get
@@ -588,6 +607,11 @@ protected override DbTransaction DbTransaction
}
///
+ [DefaultValue("")]
+ [Editor("Microsoft.VSDesigner.Data.SQL.Design.SqlCommandTextEditor, " + AssemblyRef.MicrosoftVSDesigner, "System.Drawing.Design.UITypeEditor, " + AssemblyRef.SystemDrawing)]
+ [RefreshProperties(RefreshProperties.All)] // MDAC 67707
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Data)]
+ [ResDescription(StringsHelper.ResourceNames.DbCommand_CommandText)]
public override string CommandText
{
get
@@ -607,9 +631,15 @@ public override string CommandText
}
///
+ [Browsable(false)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Data)]
+ [ResDescription(StringsHelper.ResourceNames.TCE_SqlCommand_ColumnEncryptionSetting)]
public SqlCommandColumnEncryptionSetting ColumnEncryptionSetting => _columnEncryptionSetting;
///
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Data)]
+ [ResDescription(StringsHelper.ResourceNames.DbCommand_CommandTimeout)]
public override int CommandTimeout
{
get
@@ -650,6 +680,10 @@ private int DefaultCommandTimeout
}
///
+ [DefaultValue(System.Data.CommandType.Text)]
+ [RefreshProperties(RefreshProperties.All)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Data)]
+ [ResDescription(StringsHelper.ResourceNames.DbCommand_CommandType)]
public override CommandType CommandType
{
get
@@ -683,6 +717,10 @@ public override CommandType CommandType
// when the DataAdapter design wizard generates the insert/update/delete commands it will
// set the DesignTimeVisible property to false so that cmds won't appear as individual objects
///
+ [DefaultValue(true)]
+ [DesignOnly(true)]
+ [Browsable(false)]
+ [EditorBrowsableAttribute(EditorBrowsableState.Never)]
public override bool DesignTimeVisible
{
get
@@ -699,6 +737,9 @@ public override bool DesignTimeVisible
public bool EnableOptimizedParameterBinding { get; set; }
///
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Data)]
+ [ResDescription(StringsHelper.ResourceNames.DbCommand_Parameters)]
new public SqlParameterCollection Parameters
{
get
@@ -723,6 +764,9 @@ protected override DbParameterCollection DbParameterCollection
}
///
+ [DefaultValue(System.Data.UpdateRowSource.Both)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Update)]
+ [ResDescription(StringsHelper.ResourceNames.DbCommand_UpdatedRowSource)]
public override UpdateRowSource UpdatedRowSource
{
get
@@ -747,6 +791,8 @@ public override UpdateRowSource UpdatedRowSource
}
///
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_StatementCompleted)]
+ [ResDescription(StringsHelper.ResourceNames.DbCommand_StatementCompleted)]
public event StatementCompletedEventHandler StatementCompleted
{
add
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs
index 00c90bb2b9..f4594d3ca4 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs
@@ -7,6 +7,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Diagnostics;
@@ -25,6 +26,8 @@
namespace Microsoft.Data.SqlClient
{
///
+ [DefaultEvent("InfoMessage")]
+ [DesignerCategory("")]
public sealed partial class SqlConnection : DbConnection, ICloneable
{
private enum CultureCheckState : uint
@@ -114,6 +117,8 @@ private static readonly ConcurrentDictionary> _ColumnEncry
private static bool IsRetryEnabled => LocalAppContextSwitches.IsRetryEnabled;
///
+ [Browsable(false)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public SqlRetryLogicBaseProvider RetryLogicProvider
{
get
@@ -131,12 +136,21 @@ public SqlRetryLogicBaseProvider RetryLogicProvider
}
///
+ [DefaultValue(null)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Data)]
+ [ResDescription(StringsHelper.ResourceNames.TCE_SqlConnection_ColumnEncryptionKeyCacheTtl)]
public static TimeSpan ColumnEncryptionKeyCacheTtl { get; set; } = TimeSpan.FromHours(2);
///
+ [DefaultValue(null)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Data)]
+ [ResDescription(StringsHelper.ResourceNames.TCE_SqlConnection_ColumnEncryptionQueryMetadataCacheEnabled)]
public static bool ColumnEncryptionQueryMetadataCacheEnabled { get; set; } = true;
///
+ [DefaultValue(null)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Data)]
+ [ResDescription(StringsHelper.ResourceNames.TCE_SqlConnection_TrustedColumnMasterKeyPaths)]
public static IDictionary> ColumnEncryptionTrustedMasterKeyPaths => _ColumnEncryptionTrustedMasterKeyPaths;
///
@@ -421,6 +435,9 @@ private void CacheConnectionStringProperties()
// Create a new SqlStatistics object if not already there.
// connect the parser to the object.
// if there is no parser at this time we need to connect it after creation.
+ [DefaultValue(false)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Data)]
+ [ResDescription(StringsHelper.ResourceNames.SqlConnection_StatisticsEnabled)]
public bool StatisticsEnabled
{
get
@@ -546,6 +563,11 @@ internal int ConnectRetryInterval
}
///
+ [DefaultValue("")]
+ [SettingsBindableAttribute(true)]
+ [RefreshProperties(RefreshProperties.All)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Data)]
+ [ResDescription(StringsHelper.ResourceNames.SqlConnection_ConnectionString)]
public override string ConnectionString
{
get
@@ -602,6 +624,8 @@ public override string ConnectionString
}
///
+ [ResDescription(StringsHelper.ResourceNames.SqlConnection_ConnectionTimeout)]
+ [ResCategory(StringsHelper.ResourceNames.SqlConnection_DataSource)]
public override int ConnectionTimeout
{
get
@@ -612,6 +636,8 @@ public override int ConnectionTimeout
}
///
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ [ResDescription(StringsHelper.ResourceNames.SqlConnection_ConnectionTimeout)]
public int CommandTimeout
{
get
@@ -623,6 +649,9 @@ public int CommandTimeout
///
// AccessToken: To be used for token based authentication
+ [Browsable(false)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ [ResDescription(StringsHelper.ResourceNames.SqlConnection_AccessToken)]
public string AccessToken
{
get
@@ -654,6 +683,8 @@ public string AccessToken
}
///
+ [ResDescription(StringsHelper.ResourceNames.SqlConnection_Database)]
+ [ResCategory(StringsHelper.ResourceNames.SqlConnection_DataSource)]
public override string Database
{
// if the connection is open, we need to ask the inner connection what it's
@@ -724,6 +755,10 @@ internal string SQLDNSCachingSupportedStateBeforeRedirect
}
///
+ [Browsable(true)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ [ResDescription(StringsHelper.ResourceNames.SqlConnection_DataSource)]
+ [ResCategory(StringsHelper.ResourceNames.SqlConnection_DataSource)]
public override string DataSource
{
get
@@ -745,6 +780,9 @@ public override string DataSource
}
///
+ [ResCategory(StringsHelper.ResourceNames.DataCategory_Data)]
+ [ResDescription(StringsHelper.ResourceNames.SqlConnection_PacketSize)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public int PacketSize
{
// if the connection is open, we need to ask the inner connection what it's
@@ -769,6 +807,9 @@ public int PacketSize
}
///
+ [ResCategory(StringsHelper.ResourceNames.DataCategory_Data)]
+ [ResDescription(StringsHelper.ResourceNames.SqlConnection_ClientConnectionId)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public Guid ClientConnectionId
{
get
@@ -794,12 +835,18 @@ public Guid ClientConnectionId
}
///
+ [Browsable(false)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ [ResDescription(StringsHelper.ResourceNames.SqlConnection_ServerVersion)]
public override string ServerVersion
{
get => GetOpenTdsConnection().ServerVersion;
}
///
+ [Browsable(false)]
+ [ResDescription(StringsHelper.ResourceNames.SqlConnection_ServerProcessId)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public int ServerProcessId
{
get
@@ -813,6 +860,9 @@ public int ServerProcessId
}
///
+ [Browsable(false)]
+ [ResDescription(StringsHelper.ResourceNames.DbConnection_State)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public override ConnectionState State
{
get
@@ -833,6 +883,9 @@ internal SqlStatistics Statistics
}
///
+ [ResCategory(StringsHelper.ResourceNames.DataCategory_Data)]
+ [ResDescription(StringsHelper.ResourceNames.SqlConnection_WorkstationId)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string WorkstationId
{
get
@@ -847,6 +900,9 @@ public string WorkstationId
}
///
+ [Browsable(false)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ [ResDescription(StringsHelper.ResourceNames.SqlConnection_Credential)]
public SqlCredential Credential
{
get
@@ -977,6 +1033,8 @@ protected override DbProviderFactory DbProviderFactory
//
///
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_InfoMessage)]
+ [ResDescription(StringsHelper.ResourceNames.DbConnection_InfoMessage)]
public event SqlInfoMessageEventHandler InfoMessage;
///
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnectionStringBuilder.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnectionStringBuilder.cs
index e476a3b131..cbb8f0dd67 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnectionStringBuilder.cs
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnectionStringBuilder.cs
@@ -16,6 +16,7 @@
namespace Microsoft.Data.SqlClient
{
///
+ [DefaultPropertyAttribute(DbConnectionStringKeywords.DataSource)]
public sealed partial class SqlConnectionStringBuilder : DbConnectionStringBuilder
{
private enum Keywords
@@ -377,6 +378,10 @@ public override object this[string keyword]
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.ApplicationIntent)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Initialization)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_ApplicationIntent)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public ApplicationIntent ApplicationIntent
{
get { return _applicationIntent; }
@@ -393,6 +398,10 @@ public ApplicationIntent ApplicationIntent
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.ApplicationName)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Context)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_ApplicationName)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public string ApplicationName
{
get { return _applicationName; }
@@ -404,6 +413,11 @@ public string ApplicationName
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.AttachDBFilename)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Source)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_AttachDBFilename)]
+ [EditorAttribute("System.Windows.Forms.Design.FileNameEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public string AttachDBFilename
{
get { return _attachDBFilename; }
@@ -415,6 +429,10 @@ public string AttachDBFilename
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.CommandTimeout)]
+ [ResCategory(StringsHelper.ResourceNames.DataCategory_Initialization)]
+ [ResDescription(StringsHelper.ResourceNames.DbCommand_CommandTimeout)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public int CommandTimeout
{
get { return _commandTimeout; }
@@ -430,6 +448,10 @@ public int CommandTimeout
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.ConnectTimeout)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Initialization)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_ConnectTimeout)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public int ConnectTimeout
{
get { return _connectTimeout; }
@@ -445,6 +467,10 @@ public int ConnectTimeout
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.CurrentLanguage)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Initialization)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_CurrentLanguage)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public string CurrentLanguage
{
get { return _currentLanguage; }
@@ -456,6 +482,10 @@ public string CurrentLanguage
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.DataSource)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Source)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_DataSource)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public string DataSource
{
get { return _dataSource; }
@@ -467,6 +497,10 @@ public string DataSource
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.Encrypt)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Security)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_Encrypt)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public bool Encrypt
{
get { return _encrypt; }
@@ -478,6 +512,10 @@ public bool Encrypt
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.ColumnEncryptionSetting)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Security)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.TCE_DbConnectionString_ColumnEncryptionSetting)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public SqlConnectionColumnEncryptionSetting ColumnEncryptionSetting
{
get { return _columnEncryptionSetting; }
@@ -494,6 +532,10 @@ public SqlConnectionColumnEncryptionSetting ColumnEncryptionSetting
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.EnclaveAttestationUrl)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Security)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.TCE_DbConnectionString_EnclaveAttestationUrl)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public string EnclaveAttestationUrl
{
get { return _enclaveAttestationUrl; }
@@ -505,6 +547,10 @@ public string EnclaveAttestationUrl
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.AttestationProtocol)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Security)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.TCE_DbConnectionString_AttestationProtocol)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public SqlConnectionAttestationProtocol AttestationProtocol
{
get { return _attestationProtocol; }
@@ -521,6 +567,10 @@ public SqlConnectionAttestationProtocol AttestationProtocol
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.IPAddressPreference)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Security)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.TCE_DbConnectionString_IPAddressPreference)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public SqlConnectionIPAddressPreference IPAddressPreference
{
get => _ipAddressPreference;
@@ -537,6 +587,10 @@ public SqlConnectionIPAddressPreference IPAddressPreference
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.TrustServerCertificate)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Security)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_TrustServerCertificate)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public bool TrustServerCertificate
{
get { return _trustServerCertificate; }
@@ -548,6 +602,10 @@ public bool TrustServerCertificate
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.Enlist)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Pooling)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_Enlist)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public bool Enlist
{
get { return _enlist; }
@@ -559,6 +617,10 @@ public bool Enlist
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.FailoverPartner)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Source)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_FailoverPartner)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public string FailoverPartner
{
get { return _failoverPartner; }
@@ -570,6 +632,10 @@ public string FailoverPartner
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.InitialCatalog)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Source)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_InitialCatalog)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
[TypeConverter(typeof(SqlInitialCatalogConverter))]
public string InitialCatalog
{
@@ -582,6 +648,10 @@ public string InitialCatalog
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.IntegratedSecurity)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Security)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_IntegratedSecurity)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public bool IntegratedSecurity
{
get { return _integratedSecurity; }
@@ -593,6 +663,10 @@ public bool IntegratedSecurity
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.Authentication)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Security)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_Authentication)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public SqlAuthenticationMethod Authentication
{
get { return _authentication; }
@@ -609,6 +683,10 @@ public SqlAuthenticationMethod Authentication
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.LoadBalanceTimeout)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Pooling)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_LoadBalanceTimeout)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public int LoadBalanceTimeout
{
get { return _loadBalanceTimeout; }
@@ -624,6 +702,10 @@ public int LoadBalanceTimeout
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.MaxPoolSize)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Pooling)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_MaxPoolSize)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public int MaxPoolSize
{
get { return _maxPoolSize; }
@@ -639,6 +721,10 @@ public int MaxPoolSize
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.ConnectRetryCount)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_ConnectionResilency)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_ConnectRetryCount)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public int ConnectRetryCount
{
get { return _connectRetryCount; }
@@ -654,6 +740,10 @@ public int ConnectRetryCount
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.ConnectRetryInterval)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_ConnectionResilency)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_ConnectRetryInterval)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public int ConnectRetryInterval
{
get { return _connectRetryInterval; }
@@ -670,6 +760,10 @@ public int ConnectRetryInterval
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.MinPoolSize)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Pooling)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_MinPoolSize)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public int MinPoolSize
{
get { return _minPoolSize; }
@@ -685,6 +779,10 @@ public int MinPoolSize
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.MultipleActiveResultSets)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Advanced)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_MultipleActiveResultSets)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public bool MultipleActiveResultSets
{
get { return _multipleActiveResultSets; }
@@ -697,6 +795,10 @@ public bool MultipleActiveResultSets
///
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Reviewed and Approved by UE")]
+ [DisplayNameAttribute(DbConnectionStringKeywords.MultiSubnetFailover)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Source)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_MultiSubnetFailover)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public bool MultiSubnetFailover
{
get { return _multiSubnetFailover; }
@@ -721,6 +823,10 @@ public string NamedConnection {
}
*/
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.PacketSize)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Advanced)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_PacketSize)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public int PacketSize
{
get { return _packetSize; }
@@ -736,6 +842,11 @@ public int PacketSize
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.Password)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Security)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_Password)]
+ [PasswordPropertyTextAttribute(true)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public string Password
{
get { return _password; }
@@ -747,6 +858,10 @@ public string Password
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.PersistSecurityInfo)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Security)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_PersistSecurityInfo)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public bool PersistSecurityInfo
{
get { return _persistSecurityInfo; }
@@ -758,6 +873,10 @@ public bool PersistSecurityInfo
}
///
+ [DisplayName(DbConnectionStringKeywords.PoolBlockingPeriod)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Pooling)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_PoolBlockingPeriod)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public PoolBlockingPeriod PoolBlockingPeriod
{
get { return _poolBlockingPeriod; }
@@ -774,6 +893,10 @@ public PoolBlockingPeriod PoolBlockingPeriod
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.Pooling)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Pooling)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_Pooling)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public bool Pooling
{
get { return _pooling; }
@@ -785,6 +908,10 @@ public bool Pooling
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.Replication)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Replication)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_Replication)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public bool Replication
{
get { return _replication; }
@@ -796,6 +923,10 @@ public bool Replication
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.TransactionBinding)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Advanced)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_TransactionBinding)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public string TransactionBinding
{
get { return _transactionBinding; }
@@ -807,6 +938,10 @@ public string TransactionBinding
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.TypeSystemVersion)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Advanced)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_TypeSystemVersion)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public string TypeSystemVersion
{
get { return _typeSystemVersion; }
@@ -818,6 +953,10 @@ public string TypeSystemVersion
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.UserID)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Security)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_UserID)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public string UserID
{
get { return _userID; }
@@ -829,6 +968,10 @@ public string UserID
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.UserInstance)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Source)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_UserInstance)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public bool UserInstance
{
get { return _userInstance; }
@@ -840,6 +983,10 @@ public bool UserInstance
}
///
+ [DisplayNameAttribute(DbConnectionStringKeywords.WorkstationID)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Context)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbConnectionString_WorkstationID)]
+ [RefreshPropertiesAttribute(RefreshProperties.All)]
public string WorkstationID
{
get { return _workstationID; }
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDataAdapter.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDataAdapter.cs
index e745553378..1e620841a7 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDataAdapter.cs
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDataAdapter.cs
@@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.
using System;
+using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Diagnostics;
@@ -12,6 +13,9 @@
namespace Microsoft.Data.SqlClient
{
///
+ [DefaultEvent("RowUpdated")]
+ [DesignerCategory("")]
+ // TODO: Add designer and toolbox attribute when Microsoft.VSDesigner.Data.VS.SqlDataAdapterDesigner uses Microsoft.Data.SqlClient
public sealed class SqlDataAdapter : DbDataAdapter, IDbDataAdapter, ICloneable
{
private static readonly object EventRowUpdated = new object();
@@ -58,6 +62,10 @@ private SqlDataAdapter(SqlDataAdapter from) : base(from)
}
///
+ [DefaultValue(null)]
+ [Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, " + AssemblyRef.MicrosoftVSDesigner, "System.Drawing.Design.UITypeEditor, " + AssemblyRef.SystemDrawing)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Update)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbDataAdapter_DeleteCommand)]
new public SqlCommand DeleteCommand
{
get { return _deleteCommand; }
@@ -72,6 +80,10 @@ IDbCommand IDbDataAdapter.DeleteCommand
}
///
+ [DefaultValue(null)]
+ [Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, " + AssemblyRef.MicrosoftVSDesigner, "System.Drawing.Design.UITypeEditor, " + AssemblyRef.SystemDrawing)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Update)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbDataAdapter_InsertCommand)]
new public SqlCommand InsertCommand
{
get { return _insertCommand; }
@@ -86,6 +98,10 @@ IDbCommand IDbDataAdapter.InsertCommand
}
///
+ [DefaultValue(null)]
+ [Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, " + AssemblyRef.MicrosoftVSDesigner, "System.Drawing.Design.UITypeEditor, " + AssemblyRef.SystemDrawing)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Fill)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbDataAdapter_SelectCommand)]
new public SqlCommand SelectCommand
{
get { return _selectCommand; }
@@ -100,6 +116,10 @@ IDbCommand IDbDataAdapter.SelectCommand
}
///
+ [DefaultValue(null)]
+ [Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, " + AssemblyRef.MicrosoftVSDesigner, "System.Drawing.Design.UITypeEditor, " + AssemblyRef.SystemDrawing)]
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Update)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbDataAdapter_UpdateCommand)]
new public SqlCommand UpdateCommand
{
get { return _updateCommand; }
@@ -224,6 +244,8 @@ protected override RowUpdatingEventArgs CreateRowUpdatingEvent(DataRow dataRow,
}
///
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Update)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbDataAdapter_RowUpdated)]
public event SqlRowUpdatedEventHandler RowUpdated
{
add
@@ -237,6 +259,8 @@ public event SqlRowUpdatedEventHandler RowUpdated
}
///
+ [ResCategoryAttribute(StringsHelper.ResourceNames.DataCategory_Update)]
+ [ResDescriptionAttribute(StringsHelper.ResourceNames.DbDataAdapter_RowUpdating)]
public event SqlRowUpdatingEventHandler RowUpdating
{
add
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlParameter.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlParameter.cs
index 8f0549242b..522b6364da 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlParameter.cs
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlParameter.cs
@@ -301,7 +301,7 @@ public SqlParameter(
string sourceColumn,
DataRowVersion sourceVersion,
object value
- )
+ )
: this(parameterName, dbType, size, sourceColumn)
{
Direction = direction;
@@ -327,7 +327,7 @@ public SqlParameter(
string xmlSchemaCollectionDatabase,
string xmlSchemaCollectionOwningSchema,
string xmlSchemaCollectionName
- )
+ )
: this()
{
ParameterName = parameterName;
@@ -370,10 +370,10 @@ private SqlParameter(SqlParameter source) : this()
/// For unencrypted parameters, the encryption metadata should still be sent (and will indicate
/// that no encryption is needed).
///
- internal bool HasReceivedMetadata
- {
- get => HasFlag(SqlParameterFlags.HasReceivedMetadata);
- set => SetFlag(SqlParameterFlags.HasReceivedMetadata, value);
+ internal bool HasReceivedMetadata
+ {
+ get => HasFlag(SqlParameterFlags.HasReceivedMetadata);
+ set => SetFlag(SqlParameterFlags.HasReceivedMetadata, value);
}
///
@@ -471,16 +471,17 @@ public override DbType DbType
public override void ResetDbType() => ResetSqlDbType();
///
+ [ResCategory("Data")]
public override string ParameterName
{
get => _parameterName ?? string.Empty;
set
{
if (
- string.IsNullOrEmpty(value) ||
+ string.IsNullOrEmpty(value) ||
(value.Length < TdsEnums.MAX_PARAMETER_NAME_LENGTH) ||
(
- (value[0] == '@') &&
+ (value[0] == '@') &&
(value.Length <= TdsEnums.MAX_PARAMETER_NAME_LENGTH)
)
)
@@ -690,8 +691,8 @@ public string UdtTypeName
public string TypeName
{
get => _typeName ?? string.Empty;
- set
- {
+ set
+ {
_typeName = value;
IsDerivedParameterTypeName = false;
}
@@ -835,6 +836,8 @@ public override string SourceColumn
}
///
+ [ResCategory("DataCategory_Update")]
+ [ResDescription("DbParameter_SourceColumnNullMapping")]
public override bool SourceColumnNullMapping
{
get => HasFlag(SqlParameterFlags.SourceColumnNullMapping);
@@ -842,10 +845,11 @@ public override bool SourceColumnNullMapping
}
///
+ [ResCategory("Data")]
public override string ToString() => ParameterName;
///
- [ResCategory("Update")]
+ [ResCategory(StringsHelper.ResourceNames.DataCategory_Update)]
public override DataRowVersion SourceVersion
{
get
@@ -1014,7 +1018,7 @@ private void CloneHelper(SqlParameter destination)
SqlParameterFlags.CoercedValueIsSqlType |
SqlParameterFlags.ForceColumnEncryption |
SqlParameterFlags.IsDerivedParameterTypeName
- // HasScale and HasReceivedMetadata deliberately omitted
+ // HasScale and HasReceivedMetadata deliberately omitted
);
destination._metaType = _metaType;
destination._collation = _collation;
@@ -1991,7 +1995,7 @@ internal MetaType ValidateTypeLengths()
if (
(maxSizeInBytes > TdsEnums.TYPE_SIZE_LIMIT) ||
HasFlag(SqlParameterFlags.CoercedValueIsDataFeed) ||
- (sizeInCharacters == -1) ||
+ (sizeInCharacters == -1) ||
(actualSizeInBytes == -1)
)
{ // is size > size able to be described by 2 bytes
@@ -2006,7 +2010,7 @@ internal MetaType ValidateTypeLengths()
throw ADP.InvalidMetaDataValue(); //Xml should always have IsPartialLength = true
}
if (
- mt.SqlDbType == SqlDbType.NVarChar ||
+ mt.SqlDbType == SqlDbType.NVarChar ||
mt.SqlDbType == SqlDbType.VarChar ||
mt.SqlDbType == SqlDbType.VarBinary
)
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Resources/StringsHelper.cs b/src/Microsoft.Data.SqlClient/netcore/src/Resources/StringsHelper.cs
index 1a12852bc7..f1e9fa2061 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Resources/StringsHelper.cs
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Resources/StringsHelper.cs
@@ -9,7 +9,7 @@
namespace System
{
- internal class StringsHelper : Strings
+ internal partial class StringsHelper : Strings
{
static StringsHelper loader = null;
ResourceManager resources;
@@ -126,4 +126,1517 @@ public static string Format(string resourceFormat, object p1, object p2, object
return string.Format(resourceFormat, p1, p2, p3);
}
}
+
+ // This class is added temporary in order to have all Strings.resx as constant.
+ // NetFx is creating them on build time with powershell and target file located in netfx/tools folder and adds exact same class as below to obj folder for netfx.
+ // When we have the localization available for netcore we can follow the same pattern and add MetdaDataAttribute class and run them only on windows platform
+ internal partial class StringsHelper
+ {
+ internal class ResourceNames
+ {
+ internal const string ADP_Ascending = @"Ascending";
+ internal const string ADP_CollectionIndexInt32 = @"Invalid index {0} for this {1} with Count={2}.";
+ internal const string ADP_CollectionIndexString = @"A {0} with {1} '{2}' is not contained by this {3}.";
+ internal const string ADP_CollectionInvalidType = @"The {0} only accepts non-null {1} type objects, not {2} objects.";
+ internal const string ADP_CollectionIsNotParent = @"The {0} is already contained by another {1}.";
+ internal const string ADP_CollectionIsParent = @"The {0} with is already contained by this {1}.";
+ internal const string ADP_CollectionNullValue = @"The {0} only accepts non-null {1} type objects.";
+ internal const string ADP_CollectionRemoveInvalidObject = @"Attempted to remove an {0} that is not contained by this {1}.";
+ internal const string ADP_CollectionUniqueValue = @"The {0}.{1} is required to be unique, '{2}' already exists in the collection.";
+ internal const string ADP_ConnectionAlreadyOpen = @"The connection was not closed. {0}";
+ internal const string ADP_ConnectionStateMsg_Closed = @"The connection's current state is closed.";
+ internal const string ADP_ConnectionStateMsg_Connecting = @"The connection's current state is connecting.";
+ internal const string ADP_ConnectionStateMsg_Open = @"The connection's current state is open.";
+ internal const string ADP_ConnectionStateMsg_OpenExecuting = @"The connection's current state is executing.";
+ internal const string ADP_ConnectionStateMsg_OpenFetching = @"The connection's current state is fetching.";
+ internal const string ADP_ConnectionStateMsg = @"The connection's current state: {0}.";
+ internal const string ADP_ConnectionStringSyntax = @"Format of the initialization string does not conform to specification starting at index {0}.";
+ internal const string ADP_DataReaderClosed = @"Invalid attempt to call {0} when reader is closed.";
+ internal const string ADP_DelegatedTransactionPresent = @"Cannot enlist in the transaction because the connection is the primary connection for a delegated or promoted transaction.";
+ internal const string ADP_Descending = @"Descending";
+ internal const string ADP_EmptyString = @"Expecting non-empty string for '{0}' parameter.";
+ internal const string ADP_InternalConnectionError = @"Internal DbConnection Error: {0}";
+ internal const string ADP_InvalidDataDirectory = @"The DataDirectory substitute is not a string.";
+ internal const string ADP_InvalidEnumerationValue = @"The {0} enumeration value, {1}, is invalid.";
+ internal const string ADP_InvalidKey = @"Invalid keyword, contain one or more of 'no characters', 'control characters', 'leading or trailing whitespace' or 'leading semicolons'.";
+ internal const string ADP_InvalidOffsetValue = @"Invalid parameter Offset value '{0}'. The value must be greater than or equal to 0.";
+ internal const string ADP_InvalidValue = @"The value contains embedded nulls (\u0000).";
+ internal const string ADP_InvalidXMLBadVersion = @"Invalid Xml; can only parse elements of version one.";
+ internal const string ADP_NoConnectionString = @"The ConnectionString property has not been initialized.";
+ internal const string ADP_NonCLSException = @"A Non CLS Exception was caught.";
+ internal const string ADP_NotAPermissionElement = @"Given security element is not a permission element.";
+ internal const string ADP_OpenConnectionPropertySet = @"Not allowed to change the '{0}' property. {1}";
+ internal const string ADP_PendingAsyncOperation = @"Can not start another operation while there is an asynchronous operation pending.";
+ internal const string ADP_PermissionTypeMismatch = @"Type mismatch.";
+ internal const string ADP_PooledOpenTimeout = @"Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.";
+ internal const string ADP_NonPooledOpenTimeout = @"Timeout attempting to open the connection. The time period elapsed prior to attempting to open the connection has been exceeded. This may have occurred because of too many simultaneous non-pooled connection attempts.";
+ internal const string ADP_InvalidMixedUsageOfSecureAndClearCredential = @"Cannot use Credential with UserID, UID, Password, or PWD connection string keywords.";
+ internal const string ADP_InvalidMixedUsageOfSecureCredentialAndIntegratedSecurity = @"Cannot use Credential with Integrated Security connection string keyword.";
+ internal const string ADP_InvalidMixedUsageOfSecureCredentialAndContextConnection = @"Cannot use Credential with Context Connection keyword.";
+ internal const string ADP_InvalidMixedUsageOfAccessTokenAndUserIDPassword = @"Cannot set the AccessToken property if 'UserID', 'UID', 'Password', or 'PWD' has been specified in connection string.";
+ internal const string ADP_InvalidMixedUsageOfAccessTokenAndIntegratedSecurity = @"Cannot set the AccessToken property if the 'Integrated Security' connection string keyword has been set to 'true' or 'SSPI'.";
+ internal const string ADP_InvalidMixedUsageOfAccessTokenAndContextConnection = @"Cannot set the AccessToken property with the 'Context Connection' keyword.";
+ internal const string ADP_InvalidMixedUsageOfAccessTokenAndCredential = @"Cannot set the AccessToken property if the Credential property is already set.";
+ internal const string ADP_InvalidMixedUsageOfCredentialAndAccessToken = @"Cannot set the Credential property if the AccessToken property is already set.";
+ internal const string ADP_InvalidMixedUsageOfAccessTokenAndAuthentication = @"Cannot set the AccessToken property if 'Authentication' has been specified in the connection string.";
+ internal const string ADP_MustBeReadOnly = @"{0} must be marked as read only.";
+ internal const string DataCategory_Data = @"Data";
+ internal const string DataCategory_StateChange = @"StateChange";
+ internal const string DataCategory_Update = @"Update";
+ internal const string DbCommand_CommandTimeout = @"Time to wait for command to execute.";
+ internal const string DbConnection_State = @"The ConnectionState indicating whether the connection is open or closed.";
+ internal const string DbConnection_StateChange = @"Event triggered when the connection changes state.";
+ internal const string DbParameter_DbType = @"The parameter generic type.";
+ internal const string DbParameter_Direction = @"Input, output, or bidirectional parameter.";
+ internal const string DbParameter_IsNullable = @"a design-time property used for strongly typed code-generation.";
+ internal const string DbParameter_Offset = @"Offset in variable length data types.";
+ internal const string DbParameter_ParameterName = @"Name of the parameter.";
+ internal const string DbParameter_Size = @"Size of variable length data types (string & arrays).";
+ internal const string DbParameter_SourceColumn = @"When used by a DataAdapter.Update, the source column name that is used to find the DataSetColumn name in the ColumnMappings. This is to copy a value between the parameter and a data row.";
+ internal const string DbParameter_SourceVersion = @"When used by a DataAdapter.Update (UpdateCommand only), the version of the DataRow value that is used to update the data source.";
+ internal const string DbParameter_SourceColumnNullMapping = @"When used by DataAdapter.Update, the parameter value is changed from DBNull.Value into (Int32)1 or (Int32)0 if non-null.";
+ internal const string DbParameter_Value = @"Value of the parameter.";
+ internal const string MDF_QueryFailed = @"Unable to build the '{0}' collection because execution of the SQL query failed. See the inner exception for details.";
+ internal const string MDF_TooManyRestrictions = @"More restrictions were provided than the requested schema ('{0}') supports.";
+ internal const string MDF_InvalidRestrictionValue = @"'{2}' is not a valid value for the '{1}' restriction of the '{0}' schema collection.";
+ internal const string MDF_UndefinedCollection = @"The requested collection ({0}) is not defined.";
+ internal const string MDF_UndefinedPopulationMechanism = @"The population mechanism '{0}' is not defined.";
+ internal const string MDF_UnsupportedVersion = @"The requested collection ({0}) is not supported by this version of the provider.";
+ internal const string MDF_MissingDataSourceInformationColumn = @"One of the required DataSourceInformation tables columns is missing.";
+ internal const string MDF_IncorrectNumberOfDataSourceInformationRows = @"The DataSourceInformation table must contain exactly one row.";
+ internal const string MDF_MissingRestrictionColumn = @"One or more of the required columns of the restrictions collection is missing.";
+ internal const string MDF_MissingRestrictionRow = @"A restriction exists for which there is no matching row in the restrictions collection.";
+ internal const string MDF_NoColumns = @"The schema table contains no columns.";
+ internal const string MDF_UnableToBuildCollection = @"Unable to build schema collection '{0}';";
+ internal const string MDF_AmbiguousCollectionName = @"The collection name '{0}' matches at least two collections with the same name but with different case, but does not match any of them exactly.";
+ internal const string MDF_CollectionNameISNotUnique = @"There are multiple collections named '{0}'.";
+ internal const string MDF_DataTableDoesNotExist = @"The collection '{0}' is missing from the metadata XML.";
+ internal const string MDF_InvalidXml = @"The metadata XML is invalid.";
+ internal const string MDF_InvalidXmlMissingColumn = @"The metadata XML is invalid. The {0} collection must contain a {1} column and it must be a string column.";
+ internal const string MDF_InvalidXmlInvalidValue = @"The metadata XML is invalid. The {1} column of the {0} collection must contain a non-empty string.";
+ internal const string DataCategory_Action = @"Action";
+ internal const string DataCategory_Behavior = @"Behavior";
+ internal const string DataCategory_Fill = @"Fill";
+ internal const string DataCategory_InfoMessage = @"InfoMessage";
+ internal const string DataCategory_Mapping = @"Mapping";
+ internal const string DataCategory_StatementCompleted = @"StatementCompleted";
+ internal const string DataCategory_Udt = @"UDT";
+ internal const string DataCategory_Notification = @"Notification";
+ internal const string DataCategory_Schema = @"Schema";
+ internal const string DataCategory_Xml = @"XML";
+ internal const string DataCategory_Advanced = @"Advanced";
+ internal const string DataCategory_Context = @"Context";
+ internal const string DataCategory_Initialization = @"Initialization";
+ internal const string DataCategory_Pooling = @"Pooling";
+ internal const string DataCategory_NamedConnectionString = @"Named ConnectionString";
+ internal const string DataCategory_Security = @"Security";
+ internal const string DataCategory_Source = @"Source";
+ internal const string DataCategory_Replication = @"Replication";
+ internal const string DataCategory_ConnectionResilency = @"Connection Resiliency";
+ internal const string ExtendedPropertiesDescr = @"The collection that holds custom user information.";
+ internal const string DataSetCaseSensitiveDescr = @"Indicates whether comparing strings within the DataSet is case sensitive.";
+ internal const string DataSetDataSetNameDescr = @"The name of this DataSet.";
+ internal const string DataSetDefaultViewDescr = @"Indicates a custom ""view"" of the data contained by the DataSet. This view allows filtering, searching, and navigating through the custom data view.";
+ internal const string DataSetEnforceConstraintsDescr = @"Indicates whether constraint rules are to be followed.";
+ internal const string DataSetHasErrorsDescr = @"Indicates that the DataSet has errors.";
+ internal const string DataSetLocaleDescr = @"Indicates a locale under which to compare strings within the DataSet.";
+ internal const string DataSetNamespaceDescr = @"Indicates the XML uri namespace for the root element pointed at by this DataSet.";
+ internal const string DataSetPrefixDescr = @"Indicates the prefix of the namespace used for this DataSet.";
+ internal const string DataSetRelationsDescr = @"The collection that holds the relations for this DataSet.";
+ internal const string DataSetTablesDescr = @"The collection that holds the tables for this DataSet.";
+ internal const string DataSetMergeFailedDescr = @"Occurs when it is not possible to merge schemas for two tables with the same name.";
+ internal const string DataSetInitializedDescr = @"Occurs after Initialization is finished.";
+ internal const string DataSetDescr = @"Represents an in-memory cache of data.";
+ internal const string DataTableCaseSensitiveDescr = @"Indicates whether comparing strings within the table is case sensitive.";
+ internal const string DataTableChildRelationsDescr = @"Returns the child relations for this table.";
+ internal const string DataTableColumnsDescr = @"The collection that holds the columns for this table.";
+ internal const string DataTableConstraintsDescr = @"The collection that holds the constraints for this table.";
+ internal const string DataTableDataSetDescr = @"Indicates the DataSet to which this table belongs.";
+ internal const string DataTableDefaultViewDescr = @"This is the default DataView for the table.";
+ internal const string DataTableDisplayExpressionDescr = @"The expression used to compute the data-bound value of this row.";
+ internal const string DataTableHasErrorsDescr = @"Returns whether the table has errors.";
+ internal const string DataTableLocaleDescr = @"Indicates a locale under which to compare strings within the table.";
+ internal const string DataTableMinimumCapacityDescr = @"Indicates an initial starting size for this table.";
+ internal const string DataTableNamespaceDescr = @"Indicates the XML uri namespace for the elements contained in this table.";
+ internal const string DataTablePrefixDescr = @"Indicates the Prefix of the namespace used for this table in XML representation.";
+ internal const string DataTableParentRelationsDescr = @"Returns the parent relations for this table.";
+ internal const string DataTablePrimaryKeyDescr = @"Indicates the column(s) that represent the primary key for this table.";
+ internal const string DataTableRowsDescr = @"Indicates the collection that holds the rows of data for this table.";
+ internal const string DataTableTableNameDescr = @"Indicates the name used to look up this table in the Tables collection of a DataSet.";
+ internal const string DataTableRowChangedDescr = @"Occurs after a row in the table has been successfully edited.";
+ internal const string DataTableRowChangingDescr = @"Occurs when the row is being changed so that the event handler can modify or cancel the change. The user can modify values in the row and should throw an exception to cancel the edit.";
+ internal const string DataTableRowDeletedDescr = @"Occurs after a row in the table has been successfully deleted.";
+ internal const string DataTableRowDeletingDescr = @"Occurs when a row in the table marked for deletion. Throw an exception to cancel the deletion.";
+ internal const string DataTableColumnChangingDescr = @"Occurs when a value has been submitted for this column. The user can modify the proposed value and should throw an exception to cancel the edit.";
+ internal const string DataTableColumnChangedDescr = @"Occurs when a value has been changed for this column.";
+ internal const string DataTableRowsClearingDescr = @"Occurs prior to clearing all rows from the table.";
+ internal const string DataTableRowsClearedDescr = @"Occurs after all rows in the table has been successfully cleared.";
+ internal const string DataTableRowsNewRowDescr = @"Occurs after a new DataRow has been instantiated.";
+ internal const string DataRelationRelationNameDescr = @"The name used to look up this relation in the Relations collection of a DataSet.";
+ internal const string DataRelationChildColumnsDescr = @"Indicates the child columns of this relation.";
+ internal const string DataRelationParentColumnsDescr = @"Indicates the parent columns of this relation.";
+ internal const string DataRelationNested = @"Indicates whether relations are nested.";
+ internal const string ForeignKeyConstraintDeleteRuleDescr = @"For deletions, indicates what kind of cascading should take place across this relation.";
+ internal const string ForeignKeyConstraintUpdateRuleDescr = @"For updates, indicates what kind of cascading should take place across this relation.";
+ internal const string ForeignKeyConstraintAcceptRejectRuleDescr = @"For accept and reject changes, indicates what kind of cascading should take place across this relation.";
+ internal const string ForeignKeyConstraintChildColumnsDescr = @"Indicates the child columns of this constraint.";
+ internal const string ForeignKeyConstraintParentColumnsDescr = @"Indicates the parent columns of this constraint.";
+ internal const string ForeignKeyRelatedTableDescr = @"Indicates the child table of this constraint.";
+ internal const string KeyConstraintColumnsDescr = @"Indicates the columns of this constraint.";
+ internal const string KeyConstraintIsPrimaryKeyDescr = @"Indicates if this constraint is a primary key.";
+ internal const string ConstraintNameDescr = @"Indicates the name of this constraint.";
+ internal const string ConstraintTableDescr = @"Indicates the table of this constraint.";
+ internal const string DataColumnAllowNullDescr = @"Indicates whether null values are allowed in this column.";
+ internal const string DataColumnAutoIncrementDescr = @"Indicates whether the column automatically increments itself for new rows added to the table. The type of this column must be Int16, Int32, or Int64.";
+ internal const string DataColumnAutoIncrementSeedDescr = @"Indicates the starting value for an AutoIncrement column.";
+ internal const string DataColumnAutoIncrementStepDescr = @"Indicates the increment used by an AutoIncrement column.";
+ internal const string DataColumnCaptionDescr = @"Indicates the default user-interface caption for this column.";
+ internal const string DataColumnColumnNameDescr = @"Indicates the name used to look up this column in the Columns collection of a DataTable.";
+ internal const string DataColumnDataTableDescr = @"Returns the DataTable to which this column belongs.";
+ internal const string DataColumnDataTypeDescr = @"Indicates the type of data stored in this column.";
+ internal const string DataColumnDefaultValueDescr = @"Indicates the default column value used when adding new rows to the table.";
+ internal const string DataColumnExpressionDescr = @"Indicates the value that this column computes for each row based on other columns instead of taking user input.";
+ internal const string DataColumnMappingDescr = @"Indicates how this column persists in XML: as an attribute, element, simple content node, or nothing.";
+ internal const string DataColumnNamespaceDescr = @"Indicates the XML uri for elements or attributes stored in this column.";
+ internal const string DataColumnPrefixDescr = @"Indicates the Prefix used for this DataColumn in xml representation.";
+ internal const string DataColumnOrdinalDescr = @"Indicates the index of this column in the Columns collection.";
+ internal const string DataColumnReadOnlyDescr = @"Indicates whether this column allows changes once a row has been added to the table.";
+ internal const string DataColumnUniqueDescr = @"Indicates whether this column should restrict its values in the rows of the table to be unique.";
+ internal const string DataColumnMaxLengthDescr = @"Indicates the maximum length of the value this column allows.";
+ internal const string DataColumnDateTimeModeDescr = @"Indicates DateTimeMode of this DataColumn.";
+ internal const string DataViewAllowDeleteDescr = @"Indicates whether this DataView and the user interface associated with it allows deletes.";
+ internal const string DataViewAllowEditDescr = @"Indicates whether this DataView and the user interface associated with it allows edits.";
+ internal const string DataViewAllowNewDescr = @"Indicates whether this DataView and the user interface associated with it allows new rows to be added.";
+ internal const string DataViewCountDescr = @"Returns the number of items currently in this view.";
+ internal const string DataViewDataViewManagerDescr = @"This returns a pointer to back to the DataViewManager that owns this DataSet (if any).";
+ internal const string DataViewIsOpenDescr = @"Indicates whether the view is open.";
+ internal const string DataViewRowFilterDescr = @"Indicates an expression used to filter the data returned by this DataView.";
+ internal const string DataViewRowStateFilterDescr = @"Indicates the versions of data returned by this DataView.";
+ internal const string DataViewSortDescr = @"Indicates the names of the column and the order in which data is returned by this DataView.";
+ internal const string DataViewApplyDefaultSortDescr = @"Indicates whether to use the default sort if the Sort property is not set.";
+ internal const string DataViewTableDescr = @"Indicates the table this DataView uses to get data.";
+ internal const string DataViewListChangedDescr = @"Indicates that the data returned by this DataView has somehow changed.";
+ internal const string DataViewManagerDataSetDescr = @"Indicates the source of data for this DataViewManager.";
+ internal const string DataViewManagerTableSettingsDescr = @"Indicates the sorting/filtering/state settings for any table in the corresponding DataSet.";
+ internal const string Xml_SimpleTypeNotSupported = @"DataSet doesn't support 'union' or 'list' as simpleType.";
+ internal const string Xml_MissingAttribute = @"Invalid {0} syntax: missing required '{1}' attribute.";
+ internal const string Xml_ValueOutOfRange = @"Value '{1}' is invalid for attribute '{0}'.";
+ internal const string Xml_AttributeValues = @"The value of attribute '{0}' should be '{1}' or '{2}'.";
+ internal const string Xml_ElementTypeNotFound = @"Cannot find ElementType name='{0}'.";
+ internal const string Xml_RelationParentNameMissing = @"Parent table name is missing in relation '{0}'.";
+ internal const string Xml_RelationChildNameMissing = @"Child table name is missing in relation '{0}'.";
+ internal const string Xml_RelationTableKeyMissing = @"Parent table key is missing in relation '{0}'.";
+ internal const string Xml_RelationChildKeyMissing = @"Child table key is missing in relation '{0}'.";
+ internal const string Xml_UndefinedDatatype = @"Undefined data type: '{0}'.";
+ internal const string Xml_DatatypeNotDefined = @"Data type not defined.";
+ internal const string Xml_InvalidField = @"Invalid XPath selection inside field node. Cannot find: {0}.";
+ internal const string Xml_InvalidSelector = @"Invalid XPath selection inside selector node: {0}.";
+ internal const string Xml_InvalidKey = @"Invalid 'Key' node inside constraint named: {0}.";
+ internal const string Xml_DuplicateConstraint = @"The constraint name {0} is already used in the schema.";
+ internal const string Xml_CannotConvert = @"Cannot convert '{0}' to type '{1}'.";
+ internal const string Xml_MissingRefer = @"Missing '{0}' part in '{1}' constraint named '{2}'.";
+ internal const string Xml_MismatchKeyLength = @"Invalid Relation definition: different length keys.";
+ internal const string Xml_CircularComplexType = @"DataSet doesn't allow the circular reference in the ComplexType named '{0}'.";
+ internal const string Xml_CannotInstantiateAbstract = @"DataSet cannot instantiate an abstract ComplexType for the node {0}.";
+ internal const string Xml_MultipleTargetConverterError = @"An error occurred with the multiple target converter while writing an Xml Schema. See the inner exception for details.";
+ internal const string Xml_MultipleTargetConverterEmpty = @"An error occurred with the multiple target converter while writing an Xml Schema. A null or empty string was returned.";
+ internal const string Xml_MergeDuplicateDeclaration = @"Duplicated declaration '{0}'.";
+ internal const string Xml_MissingTable = @"Cannot load diffGram. Table '{0}' is missing in the destination dataset.";
+ internal const string Xml_MissingSQL = @"Cannot load diffGram. The 'sql' node is missing.";
+ internal const string Xml_ColumnConflict = @"Column name '{0}' is defined for different mapping types.";
+ internal const string Xml_InvalidPrefix = @"Prefix '{0}' is not valid, because it contains special characters.";
+ internal const string Xml_NestedCircular = @"Circular reference in self-nested table '{0}'.";
+ internal const string Xml_FoundEntity = @"DataSet cannot expand entities. Use XmlValidatingReader and set the EntityHandling property accordingly.";
+ internal const string Xml_PolymorphismNotSupported = @"Type '{0}' does not implement IXmlSerializable interface therefore can not proceed with serialization.";
+ internal const string Xml_CanNotDeserializeObjectType = @"Unable to proceed with deserialization. Data does not implement IXMLSerializable, therefore polymorphism is not supported.";
+ internal const string Xml_DataTableInferenceNotSupported = @"DataTable does not support schema inference from Xml.";
+ internal const string Xml_MultipleParentRows = @"Cannot proceed with serializing DataTable '{0}'. It contains a DataRow which has multiple parent rows on the same Foreign Key.";
+ internal const string Xml_IsDataSetAttributeMissingInSchema = @"IsDataSet attribute is missing in input Schema.";
+ internal const string Xml_TooManyIsDataSetAtributeInSchema = @"Cannot determine the DataSet Element. IsDataSet attribute exist more than once.";
+ internal const string Xml_DynamicWithoutXmlSerializable = @"DataSet will not serialize types that implement IDynamicMetaObjectProvider but do not also implement IXmlSerializable.";
+ internal const string Expr_NYI = @"The feature not implemented. {0}.";
+ internal const string Expr_MissingOperand = @"Syntax error: Missing operand after '{0}' operator.";
+ internal const string Expr_TypeMismatch = @"Type mismatch in expression '{0}'.";
+ internal const string Expr_ExpressionTooComplex = @"Expression is too complex.";
+ internal const string Expr_UnboundName = @"Cannot find column [{0}].";
+ internal const string Expr_InvalidString = @"The expression contains an invalid string constant: {0}.";
+ internal const string Expr_UndefinedFunction = @"The expression contains undefined function call {0}().";
+ internal const string Expr_Syntax = @"Syntax error in the expression.";
+ internal const string Expr_FunctionArgumentCount = @"Invalid number of arguments: function {0}().";
+ internal const string Expr_MissingRightParen = @"The expression is missing the closing parenthesis.";
+ internal const string Expr_UnknownToken = @"Cannot interpret token '{0}' at position {1}.";
+ internal const string Expr_UnknownToken1 = @"Expected {0}, but actual token at the position {2} is {1}.";
+ internal const string Expr_DatatypeConvertion = @"Cannot convert from {0} to {1}.";
+ internal const string Expr_DatavalueConvertion = @"Cannot convert value '{0}' to Type: {1}.";
+ internal const string Expr_InvalidName = @"Invalid column name [{0}].";
+ internal const string Expr_InvalidDate = @"The expression contains invalid date constant '{0}'.";
+ internal const string Expr_NonConstantArgument = @"Only constant expressions are allowed in the expression list for the IN operator.";
+ internal const string Expr_InvalidPattern = @"Error in Like operator: the string pattern '{0}' is invalid.";
+ internal const string Expr_InWithoutParentheses = @"Syntax error: The items following the IN keyword must be separated by commas and be enclosed in parentheses.";
+ internal const string Expr_ArgumentType = @"Type mismatch in function argument: {0}(), argument {1}, expected {2}.";
+ internal const string Expr_ArgumentTypeInteger = @"Type mismatch in function argument: {0}(), argument {1}, expected one of the Integer types.";
+ internal const string Expr_TypeMismatchInBinop = @"Cannot perform '{0}' operation on {1} and {2}.";
+ internal const string Expr_AmbiguousBinop = @"Operator '{0}' is ambiguous on operands of type '{1}' and '{2}'. Cannot mix signed and unsigned types. Please use explicit Convert() function.";
+ internal const string Expr_InWithoutList = @"Syntax error: The IN keyword must be followed by a non-empty list of expressions separated by commas, and also must be enclosed in parentheses.";
+ internal const string Expr_UnsupportedOperator = @"The expression contains unsupported operator '{0}'.";
+ internal const string Expr_InvalidNameBracketing = @"The expression contains invalid name: '{0}'.";
+ internal const string Expr_MissingOperandBefore = @"Syntax error: Missing operand before '{0}' operator.";
+ internal const string Expr_TooManyRightParentheses = @"The expression has too many closing parentheses.";
+ internal const string Expr_UnresolvedRelation = @"The table [{0}] involved in more than one relation. You must explicitly mention a relation name in the expression '{1}'.";
+ internal const string Expr_AggregateArgument = @"Syntax error in aggregate argument: Expecting a single column argument with possible 'Child' qualifier.";
+ internal const string Expr_AggregateUnbound = @"Unbound reference in the aggregate expression '{0}'.";
+ internal const string Expr_EvalNoContext = @"Cannot evaluate non-constant expression without current row.";
+ internal const string Expr_ExpressionUnbound = @"Unbound reference in the expression '{0}'.";
+ internal const string Expr_ComputeNotAggregate = @"Cannot evaluate. Expression '{0}' is not an aggregate.";
+ internal const string Expr_FilterConvertion = @"Filter expression '{0}' does not evaluate to a Boolean term.";
+ internal const string Expr_InvalidType = @"Invalid type name '{0}'.";
+ internal const string Expr_LookupArgument = @"Syntax error in Lookup expression: Expecting keyword 'Parent' followed by a single column argument with possible relation qualifier: Parent[()]..";
+ internal const string Expr_InvokeArgument = @"Need a row or a table to Invoke DataFilter.";
+ internal const string Expr_ArgumentOutofRange = @"{0}() argument is out of range.";
+ internal const string Expr_IsSyntax = @"Syntax error: Invalid usage of 'Is' operator. Correct syntax: Is [Not] Null.";
+ internal const string Expr_Overflow = @"Value is either too large or too small for Type '{0}'.";
+ internal const string Expr_DivideByZero = @"Divide by zero error encountered.";
+ internal const string Expr_BindFailure = @"Cannot find the parent relation '{0}'.";
+ internal const string Expr_InvalidHoursArgument = @"'hours' argument is out of range. Value must be between -14 and +14.";
+ internal const string Expr_InvalidMinutesArgument = @"'minutes' argument is out of range. Value must be between -59 and +59.";
+ internal const string Expr_InvalidTimeZoneRange = @"Provided range for time one exceeds total of 14 hours.";
+ internal const string Expr_MismatchKindandTimeSpan = @"Kind property of provided DateTime argument, does not match 'hours' and 'minutes' arguments.";
+ internal const string Expr_UnsupportedType = @"A DataColumn of type '{0}' does not support expression.";
+ internal const string Data_EnforceConstraints = @"Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.";
+ internal const string Data_CannotModifyCollection = @"Collection itself is not modifiable.";
+ internal const string Data_CaseInsensitiveNameConflict = @"The given name '{0}' matches at least two names in the collection object with different cases, but does not match either of them with the same case.";
+ internal const string Data_NamespaceNameConflict = @"The given name '{0}' matches at least two names in the collection object with different namespaces.";
+ internal const string Data_InvalidOffsetLength = @"Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.";
+ internal const string Data_ArgumentOutOfRange = @"'{0}' argument is out of range.";
+ internal const string Data_ArgumentNull = @"'{0}' argument cannot be null.";
+ internal const string Data_ArgumentContainsNull = @"'{0}' argument contains null value.";
+ internal const string DataColumns_OutOfRange = @"Cannot find column {0}.";
+ internal const string DataColumns_Add1 = @"Column '{0}' already belongs to this DataTable.";
+ internal const string DataColumns_Add2 = @"Column '{0}' already belongs to another DataTable.";
+ internal const string DataColumns_Add3 = @"Cannot have more than one SimpleContent columns in a DataTable.";
+ internal const string DataColumns_Add4 = @"Cannot add a SimpleContent column to a table containing element columns or nested relations.";
+ internal const string DataColumns_AddDuplicate = @"A column named '{0}' already belongs to this DataTable.";
+ internal const string DataColumns_AddDuplicate2 = @"Cannot add a column named '{0}': a nested table with the same name already belongs to this DataTable.";
+ internal const string DataColumns_AddDuplicate3 = @"A column named '{0}' already belongs to this DataTable: cannot set a nested table name to the same name.";
+ internal const string DataColumns_Remove = @"Cannot remove a column that doesn't belong to this table.";
+ internal const string DataColumns_RemovePrimaryKey = @"Cannot remove this column, because it's part of the primary key.";
+ internal const string DataColumns_RemoveChildKey = @"Cannot remove this column, because it is part of the parent key for relationship {0}.";
+ internal const string DataColumns_RemoveConstraint = @"Cannot remove this column, because it is a part of the constraint {0} on the table {1}.";
+ internal const string DataColumns_RemoveExpression = @"Cannot remove this column, because it is part of an expression: {0} = {1}.";
+ internal const string DataColumn_AutoIncrementAndExpression = @"Cannot set AutoIncrement property for a computed column.";
+ internal const string DataColumn_AutoIncrementAndDefaultValue = @"Cannot set AutoIncrement property for a column with DefaultValue set.";
+ internal const string DataColumn_DefaultValueAndAutoIncrement = @"Cannot set a DefaultValue on an AutoIncrement column.";
+ internal const string DataColumn_AutoIncrementSeed = @"AutoIncrementStep must be a non-zero value.";
+ internal const string DataColumn_NameRequired = @"ColumnName is required when it is part of a DataTable.";
+ internal const string DataColumn_ChangeDataType = @"Cannot change DataType of a column once it has data.";
+ internal const string DataColumn_NullDataType = @"Column requires a valid DataType.";
+ internal const string DataColumn_DefaultValueDataType = @"The DefaultValue for column {0} is of type {1} and cannot be converted to {2}.";
+ internal const string DataColumn_DefaultValueDataType1 = @"The DefaultValue for the column is of type {0} and cannot be converted to {1}.";
+ internal const string DataColumn_DefaultValueColumnDataType = @"The DefaultValue for column {0} is of type {1}, but the column is of type {2}.";
+ internal const string DataColumn_ReadOnlyAndExpression = @"Cannot change ReadOnly property for the expression column.";
+ internal const string DataColumn_UniqueAndExpression = @"Cannot change Unique property for the expression column.";
+ internal const string DataColumn_ExpressionAndUnique = @"Cannot create an expression on a column that has AutoIncrement or Unique.";
+ internal const string DataColumn_ExpressionAndReadOnly = @"Cannot set expression because column cannot be made ReadOnly.";
+ internal const string DataColumn_ExpressionAndConstraint = @"Cannot set Expression property on column {0}, because it is a part of a constraint.";
+ internal const string DataColumn_ExpressionInConstraint = @"Cannot create a constraint based on Expression column {0}.";
+ internal const string DataColumn_ExpressionCircular = @"Cannot set Expression property due to circular reference in the expression.";
+ internal const string DataColumn_NullKeyValues = @"Column '{0}' has null values in it.";
+ internal const string DataColumn_NullValues = @"Column '{0}' does not allow nulls.";
+ internal const string DataColumn_ReadOnly = @"Column '{0}' is read only.";
+ internal const string DataColumn_NonUniqueValues = @"Column '{0}' contains non-unique values.";
+ internal const string DataColumn_NotInTheTable = @"Column '{0}' does not belong to table {1}.";
+ internal const string DataColumn_NotInAnyTable = @"Column must belong to a table.";
+ internal const string DataColumn_SetFailed = @"Couldn't store <{0}> in {1} Column. Expected type is {2}.";
+ internal const string DataColumn_CannotSetToNull = @"Cannot set Column '{0}' to be null. Please use DBNull instead.";
+ internal const string DataColumn_LongerThanMaxLength = @"Cannot set column '{0}'. The value violates the MaxLength limit of this column.";
+ internal const string DataColumn_HasToBeStringType = @"MaxLength applies to string data type only. You cannot set Column '{0}' property MaxLength to be non-negative number.";
+ internal const string DataColumn_CannotSetMaxLength = @"Cannot set Column '{0}' property MaxLength to '{1}'. There is at least one string in the table longer than the new limit.";
+ internal const string DataColumn_CannotSetMaxLength2 = @"Cannot set Column '{0}' property MaxLength. The Column is SimpleContent.";
+ internal const string DataColumn_CannotSimpleContentType = @"Cannot set Column '{0}' property DataType to {1}. The Column is SimpleContent.";
+ internal const string DataColumn_CannotSimpleContent = @"Cannot set Column '{0}' property MappingType to SimpleContent. The Column DataType is {1}.";
+ internal const string DataColumn_ExceedMaxLength = @"Column '{0}' exceeds the MaxLength limit.";
+ internal const string DataColumn_NotAllowDBNull = @"Column '{0}' does not allow DBNull.Value.";
+ internal const string DataColumn_CannotChangeNamespace = @"Cannot change the Column '{0}' property Namespace. The Column is SimpleContent.";
+ internal const string DataColumn_AutoIncrementCannotSetIfHasData = @"Cannot change AutoIncrement of a DataColumn with type '{0}' once it has data.";
+ internal const string DataColumn_NotInTheUnderlyingTable = @"Column '{0}' does not belong to underlying table '{1}'.";
+ internal const string DataColumn_InvalidDataColumnMapping = @"DataColumn with type '{0}' is a complexType. Can not serialize value of a complex type as Attribute";
+ internal const string DataColumn_CannotSetDateTimeModeForNonDateTimeColumns = @"The DateTimeMode can be set only on DataColumns of type DateTime.";
+ internal const string DataColumn_InvalidDateTimeMode = @"'{0}' is Invalid DataSetDateTime value.";
+ internal const string DataColumn_DateTimeMode = @"Cannot change DateTimeMode from '{0}' to '{1}' once the table has data.";
+ internal const string DataColumn_INullableUDTwithoutStaticNull = @"Type '{0}' does not contain static Null property or field.";
+ internal const string DataColumn_UDTImplementsIChangeTrackingButnotIRevertible = @"Type '{0}' does not implement IRevertibleChangeTracking; therefore can not proceed with RejectChanges().";
+ internal const string DataColumn_SetAddedAndModifiedCalledOnNonUnchanged = @"SetAdded and SetModified can only be called on DataRows with Unchanged DataRowState.";
+ internal const string DataColumn_OrdinalExceedMaximun = @"Ordinal '{0}' exceeds the maximum number.";
+ internal const string DataColumn_NullableTypesNotSupported = @"DataSet does not support System.Nullable<>.";
+ internal const string DataConstraint_NoName = @"Cannot change the name of a constraint to empty string when it is in the ConstraintCollection.";
+ internal const string DataConstraint_Violation = @"Cannot enforce constraints on constraint {0}.";
+ internal const string DataConstraint_ViolationValue = @"Column '{0}' is constrained to be unique. Value '{1}' is already present.";
+ internal const string DataConstraint_NotInTheTable = @"Constraint '{0}' does not belong to this DataTable.";
+ internal const string DataConstraint_OutOfRange = @"Cannot find constraint {0}.";
+ internal const string DataConstraint_Duplicate = @"Constraint matches constraint named {0} already in collection.";
+ internal const string DataConstraint_DuplicateName = @"A Constraint named '{0}' already belongs to this DataTable.";
+ internal const string DataConstraint_UniqueViolation = @"These columns don't currently have unique values.";
+ internal const string DataConstraint_ForeignTable = @"These columns don't point to this table.";
+ internal const string DataConstraint_ParentValues = @"This constraint cannot be enabled as not all values have corresponding parent values.";
+ internal const string DataConstraint_AddFailed = @"This constraint cannot be added since ForeignKey doesn't belong to table {0}.";
+ internal const string DataConstraint_RemoveFailed = @"Cannot remove a constraint that doesn't belong to this table.";
+ internal const string DataConstraint_NeededForForeignKeyConstraint = @"Cannot remove unique constraint '{0}'. Remove foreign key constraint '{1}' first.";
+ internal const string DataConstraint_CascadeDelete = @"Cannot delete this row because constraints are enforced on relation {0}, and deleting this row will strand child rows.";
+ internal const string DataConstraint_CascadeUpdate = @"Cannot make this change because constraints are enforced on relation {0}, and changing this value will strand child rows.";
+ internal const string DataConstraint_ClearParentTable = @"Cannot clear table {0} because ForeignKeyConstraint {1} enforces constraints and there are child rows in {2}.";
+ internal const string DataConstraint_ForeignKeyViolation = @"ForeignKeyConstraint {0} requires the child key values ({1}) to exist in the parent table.";
+ internal const string DataConstraint_BadObjectPropertyAccess = @"Property not accessible because '{0}'.";
+ internal const string DataConstraint_RemoveParentRow = @"Cannot remove this row because it has child rows, and constraints on relation {0} are enforced.";
+ internal const string DataConstraint_AddPrimaryKeyConstraint = @"Cannot add primary key constraint since primary key is already set for the table.";
+ internal const string DataConstraint_CantAddConstraintToMultipleNestedTable = @"Cannot add constraint to DataTable '{0}' which is a child table in two nested relations.";
+ internal const string DataKey_TableMismatch = @"Cannot create a Key from Columns that belong to different tables.";
+ internal const string DataKey_NoColumns = @"Cannot have 0 columns.";
+ internal const string DataKey_TooManyColumns = @"Cannot have more than {0} columns.";
+ internal const string DataKey_DuplicateColumns = @"Cannot create a Key when the same column is listed more than once: '{0}'";
+ internal const string DataKey_RemovePrimaryKey = @"Cannot remove unique constraint since it's the primary key of a table.";
+ internal const string DataKey_RemovePrimaryKey1 = @"Cannot remove unique constraint since it's the primary key of table {0}.";
+ internal const string DataRelation_ColumnsTypeMismatch = @"Parent Columns and Child Columns don't have type-matching columns.";
+ internal const string DataRelation_KeyColumnsIdentical = @"ParentKey and ChildKey are identical.";
+ internal const string DataRelation_KeyLengthMismatch = @"ParentColumns and ChildColumns should be the same length.";
+ internal const string DataRelation_KeyZeroLength = @"ParentColumns and ChildColumns must not be zero length.";
+ internal const string DataRelation_ForeignRow = @"The row doesn't belong to the same DataSet as this relation.";
+ internal const string DataRelation_NoName = @"RelationName is required when it is part of a DataSet.";
+ internal const string DataRelation_ForeignTable = @"GetChildRows requires a row whose Table is {0}, but the specified row's Table is {1}.";
+ internal const string DataRelation_ForeignDataSet = @"This relation should connect two tables in this DataSet to be added to this DataSet.";
+ internal const string DataRelation_GetParentRowTableMismatch = @"GetParentRow requires a row whose Table is {0}, but the specified row's Table is {1}.";
+ internal const string DataRelation_SetParentRowTableMismatch = @"SetParentRow requires a child row whose Table is {0}, but the specified row's Table is {1}.";
+ internal const string DataRelation_DataSetMismatch = @"Cannot have a relationship between tables in different DataSets.";
+ internal const string DataRelation_TablesInDifferentSets = @"Cannot create a relation between tables in different DataSets.";
+ internal const string DataRelation_AlreadyExists = @"A relation already exists for these child columns.";
+ internal const string DataRelation_DoesNotExist = @"This relation doesn't belong to this relation collection.";
+ internal const string DataRelation_AlreadyInOtherDataSet = @"This relation already belongs to another DataSet.";
+ internal const string DataRelation_AlreadyInTheDataSet = @"This relation already belongs to this DataSet.";
+ internal const string DataRelation_DuplicateName = @"A Relation named '{0}' already belongs to this DataSet.";
+ internal const string DataRelation_NotInTheDataSet = @"Relation {0} does not belong to this DataSet.";
+ internal const string DataRelation_OutOfRange = @"Cannot find relation {0}.";
+ internal const string DataRelation_TableNull = @"Cannot create a collection on a null table.";
+ internal const string DataRelation_TableWasRemoved = @"The table this collection displays relations for has been removed from its DataSet.";
+ internal const string DataRelation_ChildTableMismatch = @"Cannot add a relation to this table's ParentRelation collection where this table isn't the child table.";
+ internal const string DataRelation_ParentTableMismatch = @"Cannot add a relation to this table's ChildRelation collection where this table isn't the parent table.";
+ internal const string DataRelation_RelationNestedReadOnly = @"Cannot set the 'Nested' property to false for this relation.";
+ internal const string DataRelation_TableCantBeNestedInTwoTables = @"The same table '{0}' cannot be the child table in two nested relations.";
+ internal const string DataRelation_LoopInNestedRelations = @"The table ({0}) cannot be the child table to itself in nested relations.";
+ internal const string DataRelation_CaseLocaleMismatch = @"Cannot add a DataRelation or Constraint that has different Locale or CaseSensitive settings between its parent and child tables.";
+ internal const string DataRelation_ParentOrChildColumnsDoNotHaveDataSet = @"Cannot create a DataRelation if Parent or Child Columns are not in a DataSet.";
+ internal const string DataRelation_InValidNestedRelation = @"Nested table '{0}' which inherits its namespace cannot have multiple parent tables in different namespaces.";
+ internal const string DataRelation_InValidNamespaceInNestedRelation = @"Nested table '{0}' with empty namespace cannot have multiple parent tables in different namespaces.";
+ internal const string DataRow_NotInTheDataSet = @"The row doesn't belong to the same DataSet as this relation.";
+ internal const string DataRow_NotInTheTable = @"Cannot perform this operation on a row not in the table.";
+ internal const string DataRow_ParentRowNotInTheDataSet = @"This relation and child row don't belong to same DataSet.";
+ internal const string DataRow_EditInRowChanging = @"Cannot change a proposed value in the RowChanging event.";
+ internal const string DataRow_EndEditInRowChanging = @"Cannot call EndEdit() inside an OnRowChanging event.";
+ internal const string DataRow_BeginEditInRowChanging = @"Cannot call BeginEdit() inside the RowChanging event.";
+ internal const string DataRow_CancelEditInRowChanging = @"Cannot call CancelEdit() inside an OnRowChanging event. Throw an exception to cancel this update.";
+ internal const string DataRow_DeleteInRowDeleting = @"Cannot call Delete inside an OnRowDeleting event. Throw an exception to cancel this delete.";
+ internal const string DataRow_ValuesArrayLength = @"Input array is longer than the number of columns in this table.";
+ internal const string DataRow_NoCurrentData = @"There is no Current data to access.";
+ internal const string DataRow_NoOriginalData = @"There is no Original data to access.";
+ internal const string DataRow_NoProposedData = @"There is no Proposed data to access.";
+ internal const string DataRow_RemovedFromTheTable = @"This row has been removed from a table and does not have any data. BeginEdit() will allow creation of new data in this row.";
+ internal const string DataRow_DeletedRowInaccessible = @"Deleted row information cannot be accessed through the row.";
+ internal const string DataRow_InvalidVersion = @"Version must be Original, Current, or Proposed.";
+ internal const string DataRow_OutOfRange = @"There is no row at position {0}.";
+ internal const string DataRow_RowInsertOutOfRange = @"The row insert position {0} is invalid.";
+ internal const string DataRow_RowInsertTwice = @"The rowOrder value={0} has been found twice for table named '{1}'.";
+ internal const string DataRow_RowInsertMissing = @"Values are missing in the rowOrder sequence for table '{0}'.";
+ internal const string DataRow_RowOutOfRange = @"The given DataRow is not in the current DataRowCollection.";
+ internal const string DataRow_AlreadyInOtherCollection = @"This row already belongs to another table.";
+ internal const string DataRow_AlreadyInTheCollection = @"This row already belongs to this table.";
+ internal const string DataRow_AlreadyDeleted = @"Cannot delete this row since it's already deleted.";
+ internal const string DataRow_Empty = @"This row is empty.";
+ internal const string DataRow_AlreadyRemoved = @"Cannot remove a row that's already been removed.";
+ internal const string DataRow_MultipleParents = @"A child row has multiple parents.";
+ internal const string DataRow_InvalidRowBitPattern = @"Unrecognized row state bit pattern.";
+ internal const string DataSet_SetNameToEmpty = @"Cannot change the name of the DataSet to an empty string.";
+ internal const string DataSet_SetDataSetNameConflicting = @"The name '{0}' is invalid. A DataSet cannot have the same name of the DataTable.";
+ internal const string DataSet_UnsupportedSchema = @"The schema namespace is invalid. Please use this one instead: {0}.";
+ internal const string DataSet_CannotChangeCaseLocale = @"Cannot change CaseSensitive or Locale property. This change would lead to at least one DataRelation or Constraint to have different Locale or CaseSensitive settings between its related tables.";
+ internal const string DataSet_CannotChangeSchemaSerializationMode = @"SchemaSerializationMode property can be set only if it is overridden by derived DataSet.";
+ internal const string DataTable_ForeignPrimaryKey = @"PrimaryKey columns do not belong to this table.";
+ internal const string DataTable_CannotAddToSimpleContent = @"Cannot add a nested relation or an element column to a table containing a SimpleContent column.";
+ internal const string DataTable_NoName = @"TableName is required when it is part of a DataSet.";
+ internal const string DataTable_MultipleSimpleContentColumns = @"DataTable already has a simple content column.";
+ internal const string DataTable_MissingPrimaryKey = @"Table doesn't have a primary key.";
+ internal const string DataTable_InvalidSortString = @"{0} isn't a valid Sort string entry.";
+ internal const string DataTable_CanNotSerializeDataTableHierarchy = @"Cannot serialize the DataTable. A DataTable being used in one or more DataColumn expressions is not a descendant of current DataTable.";
+ internal const string DataTable_CanNotRemoteDataTable = @"This DataTable can only be remoted as part of DataSet. One or more Expression Columns has reference to other DataTable(s).";
+ internal const string DataTable_CanNotSetRemotingFormat = @"Cannot have different remoting format property value for DataSet and DataTable.";
+ internal const string DataTable_CanNotSerializeDataTableWithEmptyName = @"Cannot serialize the DataTable. DataTable name is not set.";
+ internal const string DataTable_DuplicateName = @"A DataTable named '{0}' already belongs to this DataSet.";
+ internal const string DataTable_DuplicateName2 = @"A DataTable named '{0}' with the same Namespace '{1}' already belongs to this DataSet.";
+ internal const string DataTable_SelfnestedDatasetConflictingName = @"The table ({0}) cannot be the child table to itself in a nested relation: the DataSet name conflicts with the table name.";
+ internal const string DataTable_DatasetConflictingName = @"The name '{0}' is invalid. A DataTable cannot have the same name of the DataSet.";
+ internal const string DataTable_AlreadyInOtherDataSet = @"DataTable already belongs to another DataSet.";
+ internal const string DataTable_AlreadyInTheDataSet = @"DataTable already belongs to this DataSet.";
+ internal const string DataTable_NotInTheDataSet = @"Table {0} does not belong to this DataSet.";
+ internal const string DataTable_OutOfRange = @"Cannot find table {0}.";
+ internal const string DataTable_InRelation = @"Cannot remove a table that has existing relations. Remove relations first.";
+ internal const string DataTable_InConstraint = @"Cannot remove table {0}, because it referenced in ForeignKeyConstraint {1}. Remove the constraint first.";
+ internal const string DataTable_TableNotFound = @"DataTable '{0}' does not match to any DataTable in source.";
+ internal const string DataMerge_MissingDefinition = @"Target DataSet missing definition for {0}.";
+ internal const string DataMerge_MissingConstraint = @"Target DataSet missing {0} {1}.";
+ internal const string DataMerge_DataTypeMismatch = @".{0} and
@@ -427,8 +430,7 @@
-
-
+
diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlParameter.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlParameter.cs
index 7cd0681784..aa1f1cb815 100644
--- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlParameter.cs
+++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlParameter.cs
@@ -284,7 +284,7 @@ public SqlParameter(
string sourceColumn,
DataRowVersion sourceVersion,
object value
- )
+ )
: this(parameterName, dbType, size, sourceColumn)
{
Direction = direction;
@@ -310,7 +310,7 @@ public SqlParameter(
string xmlSchemaCollectionDatabase,
string xmlSchemaCollectionOwningSchema,
string xmlSchemaCollectionName
- )
+ )
: this()
{
ParameterName = parameterName;
@@ -454,16 +454,17 @@ public override DbType DbType
public override void ResetDbType() => ResetSqlDbType();
///
+ [ResCategory("Data")]
public override string ParameterName
{
get => _parameterName ?? string.Empty;
set
{
if (
- string.IsNullOrEmpty(value) ||
+ string.IsNullOrEmpty(value) ||
(value.Length < TdsEnums.MAX_PARAMETER_NAME_LENGTH) ||
(
- (value[0] == '@') &&
+ (value[0] == '@') &&
(value.Length <= TdsEnums.MAX_PARAMETER_NAME_LENGTH)
)
)
@@ -1001,7 +1002,7 @@ private void CloneHelper(SqlParameter destination)
SqlParameterFlags.CoercedValueIsSqlType |
SqlParameterFlags.ForceColumnEncryption |
SqlParameterFlags.IsDerivedParameterTypeName
- // HasScale and HasReceivedMetadata deliberately omitted
+ // HasScale and HasReceivedMetadata deliberately omitted
);
destination._metaType = _metaType;
destination._collation = _collation;
@@ -2008,7 +2009,7 @@ internal MetaType ValidateTypeLengths(bool yukonOrNewer)
if (
(maxSizeInBytes > TdsEnums.TYPE_SIZE_LIMIT) ||
HasFlag(SqlParameterFlags.CoercedValueIsDataFeed) ||
- (sizeInCharacters == -1) ||
+ (sizeInCharacters == -1) ||
(actualSizeInBytes == -1)
)
{ // is size > size able to be described by 2 bytes
@@ -2025,8 +2026,8 @@ internal MetaType ValidateTypeLengths(bool yukonOrNewer)
throw ADP.InvalidMetaDataValue(); //Xml should always have IsPartialLength = true
}
if (
- mt.SqlDbType == SqlDbType.NVarChar ||
- mt.SqlDbType == SqlDbType.VarChar ||
+ mt.SqlDbType == SqlDbType.NVarChar ||
+ mt.SqlDbType == SqlDbType.VarChar ||
mt.SqlDbType == SqlDbType.VarBinary
)
{
diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Resources/ResDescriptionAttribute.cs b/src/Microsoft.Data.SqlClient/src/Resources/ResDescriptionAttribute.cs
similarity index 100%
rename from src/Microsoft.Data.SqlClient/netfx/src/Resources/ResDescriptionAttribute.cs
rename to src/Microsoft.Data.SqlClient/src/Resources/ResDescriptionAttribute.cs