Skip to content
Permalink
Browse files
Merge pull request #445 from szekerest/master
MSSQL: Fix for the problem with the length of the numeric fields (Fix #7249)
  • Loading branch information
NathanW2 committed Feb 27, 2013
2 parents 84db88b + f5d81ae commit b5dc7788a1a2f04077c37c01b8c35b0acdec59bd
Showing 1 changed file with 15 additions and 6 deletions.
@@ -370,12 +370,21 @@ void QgsMssqlProvider::loadFields()
{
pkCandidates << query.value( 3 ).toString();
}
mAttributeFields.append(
QgsField(
query.value( 3 ).toString(), sqlType,
sqlTypeName,
query.value( 7 ).toInt(),
query.value( 6 ).toInt() ) );
if ( sqlType == QVariant::String )
{
mAttributeFields.append(
QgsField(
query.value( 3 ).toString(), sqlType,
sqlTypeName,
query.value( 7 ).toInt() ) );
}
else
{
mAttributeFields.append(
QgsField(
query.value( 3 ).toString(), sqlType,
sqlTypeName ) );
}

if ( !query.value( 12 ).isNull() )
{

0 comments on commit b5dc778

Please sign in to comment.