Skip to content
Permalink
Browse files

fix #2026

git-svn-id: http://svn.osgeo.org/qgis/trunk@12927 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Feb 11, 2010
1 parent b1e241a commit c3942d499dc46b287d3a7f2e3cfbd4af1ef72647
Showing with 15 additions and 3 deletions.
  1. +15 −3 src/app/ogr/qgsogrhelperfunctions.cpp
@@ -97,11 +97,23 @@ QString createDatabaseURI( QString connectionType, QString host, QString databas
uri += password;
}

if ( !host.isEmpty() )
if ( !host.isEmpty() || !database.isEmpty() )
{
uri += "@" + host;
uri += "@";

if ( !host.isEmpty() )
{
uri += host;
if ( !port.isEmpty() )
uri += ":" + port;
}

if ( !database.isEmpty() )
uri += "/" + database;
{
if ( !host.isEmpty() )
uri += "/";
uri += database;
}
}
}
else if ( connectionType == "ODBC" )

0 comments on commit c3942d4

Please sign in to comment.
You can’t perform that action at this time.