diff --git a/src/Microsoft.SqlTools.Credentials/Localization/sr.cs b/src/Microsoft.SqlTools.Credentials/Localization/sr.cs
index 9f0625e1..6dd123a5 100755
--- a/src/Microsoft.SqlTools.Credentials/Localization/sr.cs
+++ b/src/Microsoft.SqlTools.Credentials/Localization/sr.cs
@@ -27,7 +27,7 @@ namespace Microsoft.SqlTools.Credentials
Keys.Culture = value;
}
}
-
+
public static string CredentialsServiceInvalidCriticalHandle
{
@@ -35,7 +35,7 @@ namespace Microsoft.SqlTools.Credentials
{
return Keys.GetString(Keys.CredentialsServiceInvalidCriticalHandle);
}
- }
+ }
public static string CredentialsServicePasswordLengthExceeded
{
@@ -43,7 +43,7 @@ namespace Microsoft.SqlTools.Credentials
{
return Keys.GetString(Keys.CredentialsServicePasswordLengthExceeded);
}
- }
+ }
public static string CredentialsServiceTargetForDelete
{
@@ -51,7 +51,7 @@ namespace Microsoft.SqlTools.Credentials
{
return Keys.GetString(Keys.CredentialsServiceTargetForDelete);
}
- }
+ }
public static string CredentialsServiceTargetForLookup
{
@@ -59,7 +59,7 @@ namespace Microsoft.SqlTools.Credentials
{
return Keys.GetString(Keys.CredentialsServiceTargetForLookup);
}
- }
+ }
public static string CredentialServiceWin32CredentialDisposed
{
@@ -67,7 +67,7 @@ namespace Microsoft.SqlTools.Credentials
{
return Keys.GetString(Keys.CredentialServiceWin32CredentialDisposed);
}
- }
+ }
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Keys
@@ -75,22 +75,22 @@ namespace Microsoft.SqlTools.Credentials
static ResourceManager resourceManager = new ResourceManager("Microsoft.SqlTools.Credentials.Localization.SR", typeof(SR).GetTypeInfo().Assembly);
static CultureInfo _culture = null;
-
-
- public const string CredentialsServiceInvalidCriticalHandle = "CredentialsServiceInvalidCriticalHandle";
-
-
- public const string CredentialsServicePasswordLengthExceeded = "CredentialsServicePasswordLengthExceeded";
-
-
- public const string CredentialsServiceTargetForDelete = "CredentialsServiceTargetForDelete";
-
-
- public const string CredentialsServiceTargetForLookup = "CredentialsServiceTargetForLookup";
-
-
- public const string CredentialServiceWin32CredentialDisposed = "CredentialServiceWin32CredentialDisposed";
-
+
+
+ public const string CredentialsServiceInvalidCriticalHandle = "CredentialsServiceInvalidCriticalHandle";
+
+
+ public const string CredentialsServicePasswordLengthExceeded = "CredentialsServicePasswordLengthExceeded";
+
+
+ public const string CredentialsServiceTargetForDelete = "CredentialsServiceTargetForDelete";
+
+
+ public const string CredentialsServiceTargetForLookup = "CredentialsServiceTargetForLookup";
+
+
+ public const string CredentialServiceWin32CredentialDisposed = "CredentialServiceWin32CredentialDisposed";
+
private Keys()
{ }
@@ -111,7 +111,7 @@ namespace Microsoft.SqlTools.Credentials
{
return resourceManager.GetString(key, _culture);
}
-
- }
- }
-}
+
+ }
+ }
+}
diff --git a/src/Microsoft.SqlTools.Credentials/Localization/sr.resx b/src/Microsoft.SqlTools.Credentials/Localization/sr.resx
index b4947a92..b2ab23ff 100755
--- a/src/Microsoft.SqlTools.Credentials/Localization/sr.resx
+++ b/src/Microsoft.SqlTools.Credentials/Localization/sr.resx
@@ -120,21 +120,21 @@
Invalid CriticalHandle!
-
+
The password has exceeded 512 bytes
-
+
Target must be specified to delete a credential
-
+
Target must be specified to check existance of a credential
-
+
Win32Credential object is already disposed
-
-
+
+
diff --git a/src/Microsoft.SqlTools.Credentials/Localization/sr.xlf b/src/Microsoft.SqlTools.Credentials/Localization/sr.xlf
index 577660b5..b340af8b 100644
--- a/src/Microsoft.SqlTools.Credentials/Localization/sr.xlf
+++ b/src/Microsoft.SqlTools.Credentials/Localization/sr.xlf
@@ -1,32 +1,32 @@
-
-
-
-
-
- Invalid CriticalHandle!
- Invalid CriticalHandle!
-
-
-
- The password has exceeded 512 bytes
- The password has exceeded 512 bytes
-
-
-
- Target must be specified to delete a credential
- Target must be specified to delete a credential
-
-
-
- Target must be specified to check existance of a credential
- Target must be specified to check existance of a credential
-
-
-
- Win32Credential object is already disposed
- Win32Credential object is already disposed
-
-
-
-
+
+
+
+
+
+ Invalid CriticalHandle!
+ Invalid CriticalHandle!
+
+
+
+ The password has exceeded 512 bytes
+ The password has exceeded 512 bytes
+
+
+
+ Target must be specified to delete a credential
+ Target must be specified to delete a credential
+
+
+
+ Target must be specified to check existance of a credential
+ Target must be specified to check existance of a credential
+
+
+
+ Win32Credential object is already disposed
+ Win32Credential object is already disposed
+
+
+
+
\ No newline at end of file
diff --git a/src/Microsoft.SqlTools.Hosting/Localization/sr.cs b/src/Microsoft.SqlTools.Hosting/Localization/sr.cs
index 52ae9e27..7ec9a964 100755
--- a/src/Microsoft.SqlTools.Hosting/Localization/sr.cs
+++ b/src/Microsoft.SqlTools.Hosting/Localization/sr.cs
@@ -27,7 +27,7 @@ namespace Microsoft.SqlTools.Hosting
Keys.Culture = value;
}
}
-
+
public static string CredentialsServiceInvalidCriticalHandle
{
@@ -35,7 +35,7 @@ namespace Microsoft.SqlTools.Hosting
{
return Keys.GetString(Keys.CredentialsServiceInvalidCriticalHandle);
}
- }
+ }
public static string CredentialsServicePasswordLengthExceeded
{
@@ -43,7 +43,7 @@ namespace Microsoft.SqlTools.Hosting
{
return Keys.GetString(Keys.CredentialsServicePasswordLengthExceeded);
}
- }
+ }
public static string CredentialsServiceTargetForDelete
{
@@ -51,7 +51,7 @@ namespace Microsoft.SqlTools.Hosting
{
return Keys.GetString(Keys.CredentialsServiceTargetForDelete);
}
- }
+ }
public static string CredentialsServiceTargetForLookup
{
@@ -59,7 +59,7 @@ namespace Microsoft.SqlTools.Hosting
{
return Keys.GetString(Keys.CredentialsServiceTargetForLookup);
}
- }
+ }
public static string CredentialServiceWin32CredentialDisposed
{
@@ -67,7 +67,7 @@ namespace Microsoft.SqlTools.Hosting
{
return Keys.GetString(Keys.CredentialServiceWin32CredentialDisposed);
}
- }
+ }
public static string ServiceAlreadyRegistered
{
@@ -75,7 +75,7 @@ namespace Microsoft.SqlTools.Hosting
{
return Keys.GetString(Keys.ServiceAlreadyRegistered);
}
- }
+ }
public static string MultipleServicesFound
{
@@ -83,7 +83,7 @@ namespace Microsoft.SqlTools.Hosting
{
return Keys.GetString(Keys.MultipleServicesFound);
}
- }
+ }
public static string IncompatibleServiceForExtensionLoader
{
@@ -91,7 +91,7 @@ namespace Microsoft.SqlTools.Hosting
{
return Keys.GetString(Keys.IncompatibleServiceForExtensionLoader);
}
- }
+ }
public static string ServiceProviderNotSet
{
@@ -99,7 +99,7 @@ namespace Microsoft.SqlTools.Hosting
{
return Keys.GetString(Keys.ServiceProviderNotSet);
}
- }
+ }
public static string ServiceNotFound
{
@@ -107,7 +107,7 @@ namespace Microsoft.SqlTools.Hosting
{
return Keys.GetString(Keys.ServiceNotFound);
}
- }
+ }
public static string ServiceNotOfExpectedType
{
@@ -115,7 +115,7 @@ namespace Microsoft.SqlTools.Hosting
{
return Keys.GetString(Keys.ServiceNotOfExpectedType);
}
- }
+ }
public static string HostingUnexpectedEndOfStream
{
@@ -123,7 +123,7 @@ namespace Microsoft.SqlTools.Hosting
{
return Keys.GetString(Keys.HostingUnexpectedEndOfStream);
}
- }
+ }
public static string HostingHeaderMissingColon
{
@@ -131,7 +131,7 @@ namespace Microsoft.SqlTools.Hosting
{
return Keys.GetString(Keys.HostingHeaderMissingColon);
}
- }
+ }
public static string HostingHeaderMissingContentLengthHeader
{
@@ -139,7 +139,7 @@ namespace Microsoft.SqlTools.Hosting
{
return Keys.GetString(Keys.HostingHeaderMissingContentLengthHeader);
}
- }
+ }
public static string HostingHeaderMissingContentLengthValue
{
@@ -147,7 +147,7 @@ namespace Microsoft.SqlTools.Hosting
{
return Keys.GetString(Keys.HostingHeaderMissingContentLengthValue);
}
- }
+ }
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Keys
@@ -155,52 +155,52 @@ namespace Microsoft.SqlTools.Hosting
static ResourceManager resourceManager = new ResourceManager("Microsoft.SqlTools.Hosting.Localization.SR", typeof(SR).GetTypeInfo().Assembly);
static CultureInfo _culture = null;
-
-
- public const string CredentialsServiceInvalidCriticalHandle = "CredentialsServiceInvalidCriticalHandle";
-
-
- public const string CredentialsServicePasswordLengthExceeded = "CredentialsServicePasswordLengthExceeded";
-
-
- public const string CredentialsServiceTargetForDelete = "CredentialsServiceTargetForDelete";
-
-
- public const string CredentialsServiceTargetForLookup = "CredentialsServiceTargetForLookup";
-
-
- public const string CredentialServiceWin32CredentialDisposed = "CredentialServiceWin32CredentialDisposed";
-
-
- public const string ServiceAlreadyRegistered = "ServiceAlreadyRegistered";
-
-
- public const string MultipleServicesFound = "MultipleServicesFound";
-
-
- public const string IncompatibleServiceForExtensionLoader = "IncompatibleServiceForExtensionLoader";
-
-
- public const string ServiceProviderNotSet = "ServiceProviderNotSet";
-
-
- public const string ServiceNotFound = "ServiceNotFound";
-
-
- public const string ServiceNotOfExpectedType = "ServiceNotOfExpectedType";
-
-
- public const string HostingUnexpectedEndOfStream = "HostingUnexpectedEndOfStream";
-
-
- public const string HostingHeaderMissingColon = "HostingHeaderMissingColon";
-
-
- public const string HostingHeaderMissingContentLengthHeader = "HostingHeaderMissingContentLengthHeader";
-
-
- public const string HostingHeaderMissingContentLengthValue = "HostingHeaderMissingContentLengthValue";
-
+
+
+ public const string CredentialsServiceInvalidCriticalHandle = "CredentialsServiceInvalidCriticalHandle";
+
+
+ public const string CredentialsServicePasswordLengthExceeded = "CredentialsServicePasswordLengthExceeded";
+
+
+ public const string CredentialsServiceTargetForDelete = "CredentialsServiceTargetForDelete";
+
+
+ public const string CredentialsServiceTargetForLookup = "CredentialsServiceTargetForLookup";
+
+
+ public const string CredentialServiceWin32CredentialDisposed = "CredentialServiceWin32CredentialDisposed";
+
+
+ public const string ServiceAlreadyRegistered = "ServiceAlreadyRegistered";
+
+
+ public const string MultipleServicesFound = "MultipleServicesFound";
+
+
+ public const string IncompatibleServiceForExtensionLoader = "IncompatibleServiceForExtensionLoader";
+
+
+ public const string ServiceProviderNotSet = "ServiceProviderNotSet";
+
+
+ public const string ServiceNotFound = "ServiceNotFound";
+
+
+ public const string ServiceNotOfExpectedType = "ServiceNotOfExpectedType";
+
+
+ public const string HostingUnexpectedEndOfStream = "HostingUnexpectedEndOfStream";
+
+
+ public const string HostingHeaderMissingColon = "HostingHeaderMissingColon";
+
+
+ public const string HostingHeaderMissingContentLengthHeader = "HostingHeaderMissingContentLengthHeader";
+
+
+ public const string HostingHeaderMissingContentLengthValue = "HostingHeaderMissingContentLengthValue";
+
private Keys()
{ }
@@ -221,7 +221,7 @@ namespace Microsoft.SqlTools.Hosting
{
return resourceManager.GetString(key, _culture);
}
-
- }
- }
-}
+
+ }
+ }
+}
diff --git a/src/Microsoft.SqlTools.Hosting/Localization/sr.resx b/src/Microsoft.SqlTools.Hosting/Localization/sr.resx
index 532f5e47..babafb52 100755
--- a/src/Microsoft.SqlTools.Hosting/Localization/sr.resx
+++ b/src/Microsoft.SqlTools.Hosting/Localization/sr.resx
@@ -120,61 +120,61 @@
Invalid CriticalHandle!
-
+
The password has exceeded 512 bytes
-
+
Target must be specified to delete a credential
-
+
Target must be specified to check existance of a credential
-
+
Win32Credential object is already disposed
-
+
Cannot register service for type {0}, one or more services already registered
-
+
Multiple services found for type {0}, expected only 1
-
+
Service of type {0} cannot be created by ExtensionLoader<{1}>
-
+
SetServiceProvider() was not called to establish the required service provider
-
+
Service {0} was not found in the service provider
-
+
Service of Type {0} is not compatible with registered Type {1}
-
+
MessageReader's input stream ended unexpectedly, terminating
-
+
Message header must separate key and value using ':'
-
+
Fatal error: Content-Length header must be provided
-
+
Fatal error: Content-Length value is not an integer
-
-
+
+
diff --git a/src/Microsoft.SqlTools.Hosting/Localization/sr.xlf b/src/Microsoft.SqlTools.Hosting/Localization/sr.xlf
index 0d624148..eb98421f 100644
--- a/src/Microsoft.SqlTools.Hosting/Localization/sr.xlf
+++ b/src/Microsoft.SqlTools.Hosting/Localization/sr.xlf
@@ -1,82 +1,82 @@
-
-
-
-
-
- Invalid CriticalHandle!
- Invalid CriticalHandle!
-
-
-
- The password has exceeded 512 bytes
- The password has exceeded 512 bytes
-
-
-
- Target must be specified to delete a credential
- Target must be specified to delete a credential
-
-
-
- Target must be specified to check existance of a credential
- Target must be specified to check existance of a credential
-
-
-
- Win32Credential object is already disposed
- Win32Credential object is already disposed
-
-
-
- MessageReader's input stream ended unexpectedly, terminating
- MessageReader's input stream ended unexpectedly, terminating
-
-
-
- Message header must separate key and value using ':'
- Message header must separate key and value using ':'
-
-
-
- Fatal error: Content-Length header must be provided
- Fatal error: Content-Length header must be provided
-
-
-
- Fatal error: Content-Length value is not an integer
- Fatal error: Content-Length value is not an integer
-
-
-
- Cannot register service for type {0}, one or more services already registered
- Cannot register service for type {0}, one or more services already registered
-
-
-
- Multiple services found for type {0}, expected only 1
- Multiple services found for type {0}, expected only 1
-
-
-
- Service of type {0} cannot be created by ExtensionLoader<{1}>
- Service of type {0} cannot be created by ExtensionLoader<{1}>
-
-
-
- SetServiceProvider() was not called to establish the required service provider
- SetServiceProvider() was not called to establish the required service provider
-
-
-
- Service {0} was not found in the service provider
- Service {0} was not found in the service provider
-
-
-
- Service of Type {0} is not compatible with registered Type {1}
- Service of Type {0} is not compatible with registered Type {1}
-
-
-
-
+
+
+
+
+
+ Invalid CriticalHandle!
+ Invalid CriticalHandle!
+
+
+
+ The password has exceeded 512 bytes
+ The password has exceeded 512 bytes
+
+
+
+ Target must be specified to delete a credential
+ Target must be specified to delete a credential
+
+
+
+ Target must be specified to check existance of a credential
+ Target must be specified to check existance of a credential
+
+
+
+ Win32Credential object is already disposed
+ Win32Credential object is already disposed
+
+
+
+ MessageReader's input stream ended unexpectedly, terminating
+ MessageReader's input stream ended unexpectedly, terminating
+
+
+
+ Message header must separate key and value using ':'
+ Message header must separate key and value using ':'
+
+
+
+ Fatal error: Content-Length header must be provided
+ Fatal error: Content-Length header must be provided
+
+
+
+ Fatal error: Content-Length value is not an integer
+ Fatal error: Content-Length value is not an integer
+
+
+
+ Cannot register service for type {0}, one or more services already registered
+ Cannot register service for type {0}, one or more services already registered
+
+
+
+ Multiple services found for type {0}, expected only 1
+ Multiple services found for type {0}, expected only 1
+
+
+
+ Service of type {0} cannot be created by ExtensionLoader<{1}>
+ Service of type {0} cannot be created by ExtensionLoader<{1}>
+
+
+
+ SetServiceProvider() was not called to establish the required service provider
+ SetServiceProvider() was not called to establish the required service provider
+
+
+
+ Service {0} was not found in the service provider
+ Service {0} was not found in the service provider
+
+
+
+ Service of Type {0} is not compatible with registered Type {1}
+ Service of Type {0} is not compatible with registered Type {1}
+
+
+
+
\ No newline at end of file
diff --git a/src/Microsoft.SqlTools.ResourceProvider/Localization/sr.cs b/src/Microsoft.SqlTools.ResourceProvider/Localization/sr.cs
old mode 100644
new mode 100755
diff --git a/src/Microsoft.SqlTools.ResourceProvider/Localization/sr.resx b/src/Microsoft.SqlTools.ResourceProvider/Localization/sr.resx
old mode 100644
new mode 100755
diff --git a/src/Microsoft.SqlTools.ServiceLayer/EditData/UpdateManagement/CellUpdate.cs b/src/Microsoft.SqlTools.ServiceLayer/EditData/UpdateManagement/CellUpdate.cs
index d1cce23d..3b761667 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/EditData/UpdateManagement/CellUpdate.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/EditData/UpdateManagement/CellUpdate.cs
@@ -49,10 +49,7 @@ namespace Microsoft.SqlTools.ServiceLayer.EditData.UpdateManagement
}
else if (columnType == typeof(string))
{
- // Special case for strings because the string value should stay the same as provided
- // If user typed 'NULL' they mean NULL as text
- Value = valueAsString == TextNullString ? NullString : valueAsString;
- ValueAsString = valueAsString;
+ ProcessTextCell(valueAsString);
}
else if (columnType == typeof(Guid))
{
@@ -245,6 +242,23 @@ namespace Microsoft.SqlTools.ServiceLayer.EditData.UpdateManagement
ValueAsString = NullString;
}
+ private void ProcessTextCell(string valueAsString)
+ {
+ // Special case for strings because the string value should stay the same as provided
+ // If user typed 'NULL' they mean NULL as text
+ Value = valueAsString == TextNullString ? NullString : valueAsString;
+
+ // Make sure that the value fits inside the size of the column
+ if (Column.ColumnSize.HasValue && valueAsString.Length > Column.ColumnSize)
+ {
+ string columnSizeString = $"({Column.ColumnSize.Value})";
+ string columnTypeString = Column.DataTypeName.ToUpperInvariant() + columnSizeString;
+ throw new FormatException(SR.EditDataValueTooLarge(valueAsString, columnTypeString));
+ }
+
+ ValueAsString = valueAsString;
+ }
+
#endregion
}
}
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs
index 0fb58c60..9cfdb072 100755
--- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs
@@ -3651,6 +3651,11 @@ namespace Microsoft.SqlTools.ServiceLayer
return Keys.GetString(Keys.EditDataUnsupportedObjectType, typeName);
}
+ public static string EditDataValueTooLarge(string value, string columnType)
+ {
+ return Keys.GetString(Keys.EditDataValueTooLarge, value, columnType);
+ }
+
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Keys
{
@@ -3932,6 +3937,9 @@ namespace Microsoft.SqlTools.ServiceLayer
public const string EditDataNullNotAllowed = "EditDataNullNotAllowed";
+ public const string EditDataValueTooLarge = "EditDataValueTooLarge";
+
+
public const string EE_BatchSqlMessageNoProcedureInfo = "EE_BatchSqlMessageNoProcedureInfo";
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx
index 8c948393..0c7d3c4b 100755
--- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx
+++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx
@@ -495,6 +495,11 @@
NULL is not allowed for this column
+
+ Value {0} is too large to fit in column of type {1}
+ .
+ Parameters: 0 - value (string), 1 - columnType (string)
+
Msg {0}, Level {1}, State {2}, Line {3}
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings
index cd65c296..1d7d1c16 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings
+++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings
@@ -232,6 +232,8 @@ EditDataTimeOver24Hrs = TIME column values must be between 00:00:00.0000000 and
EditDataNullNotAllowed = NULL is not allowed for this column
+EditDataValueTooLarge(string value, string columnType) = Value {0} is too large to fit in column of type {1}
+
############################################################################
# DacFx Resources
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf
index 79bb6be2..84b7d2c9 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf
+++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf
@@ -2305,6 +2305,12 @@
For directory {0} a file with name {1} already exists
+
+ Value {0} is too large to fit in column of type {1}
+ Value {0} is too large to fit in column of type {1}
+ .
+ Parameters: 0 - value (string), 1 - columnType (string)
+