Skip to content
Permalink
Browse files
MSSQL: Fix for the problem with the length of the numeric fields (#7249)
  • Loading branch information
szekerest committed Feb 27, 2013
1 parent 84db88b commit f5d81aef3a252b644b3afc830ca81abc2ace0198
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 f5d81ae

Please sign in to comment.