mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
@@ -8631,6 +8631,11 @@ namespace Microsoft.SqlTools.ServiceLayer
|
|||||||
return Keys.GetString(Keys.QueryServiceQueryFailed, message);
|
return Keys.GetString(Keys.QueryServiceQueryFailed, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string QueryServiceUnsupportedSqlVariantType(string underlyingType, string columnName)
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.QueryServiceUnsupportedSqlVariantType, underlyingType, columnName);
|
||||||
|
}
|
||||||
|
|
||||||
public static string QueryServiceSaveAsFail(string fileName, string message)
|
public static string QueryServiceSaveAsFail(string fileName, string message)
|
||||||
{
|
{
|
||||||
return Keys.GetString(Keys.QueryServiceSaveAsFail, fileName, message);
|
return Keys.GetString(Keys.QueryServiceSaveAsFail, fileName, message);
|
||||||
@@ -9021,6 +9026,9 @@ namespace Microsoft.SqlTools.ServiceLayer
|
|||||||
public const string QueryServiceResultSetTooLarge = "QueryServiceResultSetTooLarge";
|
public const string QueryServiceResultSetTooLarge = "QueryServiceResultSetTooLarge";
|
||||||
|
|
||||||
|
|
||||||
|
public const string QueryServiceUnsupportedSqlVariantType = "QueryServiceUnsupportedSqlVariantType";
|
||||||
|
|
||||||
|
|
||||||
public const string QueryServiceSaveAsResultSetNotComplete = "QueryServiceSaveAsResultSetNotComplete";
|
public const string QueryServiceSaveAsResultSetNotComplete = "QueryServiceSaveAsResultSetNotComplete";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -303,6 +303,11 @@
|
|||||||
<value>Result set has too many rows to be safely loaded</value>
|
<value>Result set has too many rows to be safely loaded</value>
|
||||||
<comment></comment>
|
<comment></comment>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="QueryServiceUnsupportedSqlVariantType" xml:space="preserve">
|
||||||
|
<value>The underlying type "{0}" for sql variant column "{1}" could not be resolved.</value>
|
||||||
|
<comment>.
|
||||||
|
Parameters: 0 - underlyingType (string), 1 - columnName (string) </comment>
|
||||||
|
</data>
|
||||||
<data name="QueryServiceSaveAsResultSetNotComplete" xml:space="preserve">
|
<data name="QueryServiceSaveAsResultSetNotComplete" xml:space="preserve">
|
||||||
<value>Result cannot be saved until query execution has completed</value>
|
<value>Result cannot be saved until query execution has completed</value>
|
||||||
<comment></comment>
|
<comment></comment>
|
||||||
|
|||||||
@@ -124,6 +124,8 @@ QueryServiceResultSetHasNoResults = Query has no results to return
|
|||||||
|
|
||||||
QueryServiceResultSetTooLarge = Result set has too many rows to be safely loaded
|
QueryServiceResultSetTooLarge = Result set has too many rows to be safely loaded
|
||||||
|
|
||||||
|
QueryServiceUnsupportedSqlVariantType(string underlyingType, string columnName) = The underlying type "{0}" for sql variant column "{1}" could not be resolved.
|
||||||
|
|
||||||
### Save As Requests
|
### Save As Requests
|
||||||
|
|
||||||
QueryServiceSaveAsResultSetNotComplete = Result cannot be saved until query execution has completed
|
QueryServiceSaveAsResultSetNotComplete = Result cannot be saved until query execution has completed
|
||||||
|
|||||||
@@ -5708,6 +5708,12 @@
|
|||||||
<note>.
|
<note>.
|
||||||
Parameters: 0 - error (String) </note>
|
Parameters: 0 - error (String) </note>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="QueryServiceUnsupportedSqlVariantType">
|
||||||
|
<source>The underlying type "{0}" for sql variant column "{1}" could not be resolved.</source>
|
||||||
|
<target state="new">The underlying type "{0}" for sql variant column "{1}" could not be resolved.</target>
|
||||||
|
<note>.
|
||||||
|
Parameters: 0 - underlyingType (string), 1 - columnName (string) </note>
|
||||||
|
</trans-unit>
|
||||||
</body>
|
</body>
|
||||||
</file>
|
</file>
|
||||||
</xliff>
|
</xliff>
|
||||||
@@ -134,14 +134,15 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The typename is stored in the string
|
// We need to specify the assembly name for SQL types in order to resolve the type correctly.
|
||||||
colType = Type.GetType(sqlVariantType);
|
if (sqlVariantType.StartsWith("System.Data.SqlTypes."))
|
||||||
|
|
||||||
// Workaround .NET bug, see sqlbu# 440643 and vswhidbey# 599834
|
|
||||||
// TODO: Is this workaround necessary for .NET Core?
|
|
||||||
if (colType == null && sqlVariantType == "System.Data.SqlTypes.SqlSingle")
|
|
||||||
{
|
{
|
||||||
colType = typeof(SqlSingle);
|
sqlVariantType = sqlVariantType + ", System.Data.Common";
|
||||||
|
}
|
||||||
|
colType = Type.GetType(sqlVariantType);
|
||||||
|
if (colType == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentException(SR.QueryServiceUnsupportedSqlVariantType(sqlVariantType, column.ColumnName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user