Skip to content
Permalink
Browse files

make database (aka SID) optional for OCI connections

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11906 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Nov 3, 2009
1 parent 01bbefc commit 4e95212cec6d2bb0c117463881b22cc0af4bb6cd
Showing with 16 additions and 4 deletions.
  1. +16 −4 src/app/ogr/qgsogrhelperfunctions.cpp
@@ -56,10 +56,22 @@ QString createDatabaseURI( QString connectionType, QString host, QString databas
}
else if ( connectionType == "Oracle Spatial" )
{
uri = "OCI:" + user + "/" + password
+ "@" + host;
//MH 091102: connection to orcale does not seem to work with database name in uri
//+ "/" + database;
uri = "OCI:" + user;

if (( !user.isEmpty() && !password.isEmpty() ) ||
( user.isEmpty() && password.isEmpty() ) )
{
uri += "/";
if ( !password.isEmpty() )
uri += password;
}

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

0 comments on commit 4e95212

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