Skip to content

Commit

Permalink
[MSSQL] Convert uniqueidentifier to string
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Jun 2, 2014
1 parent 2d267f1 commit 88d20e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/providers/mssql/qgsmssqlprovider.cpp
Expand Up @@ -282,7 +282,8 @@ QVariant::Type QgsMssqlProvider::DecodeSqlType( QString sqlTypeName )
sqlTypeName.startsWith( "varchar", Qt::CaseInsensitive ) ||
sqlTypeName.startsWith( "nvarchar", Qt::CaseInsensitive ) ||
sqlTypeName.startsWith( "text", Qt::CaseInsensitive ) ||
sqlTypeName.startsWith( "ntext", Qt::CaseInsensitive ) )
sqlTypeName.startsWith( "ntext", Qt::CaseInsensitive ) ||
sqlTypeName.startsWith( "uniqueidentifier", Qt::CaseInsensitive ) )
{
type = QVariant::String;
}
Expand Down Expand Up @@ -321,6 +322,8 @@ QVariant::Type QgsMssqlProvider::DecodeSqlType( QString sqlTypeName )
else
{
QgsDebugMsg( QString( "Unknown field type: %1" ).arg( sqlTypeName ) );
// Everything else just dumped as a string.
type = QVariant::String;
}

return type;
Expand Down

0 comments on commit 88d20e9

Please sign in to comment.