[Qgis-developer] CRS database
Craig Leat
craig.leat at gmail.com
Mon Sep 28 05:26:16 EDT 2009
Hi
> Could not open CRS database /resources/srs.db<br>Error(14): unable to
> open database file
>
> I tried 1.0, 1.1, 1.2, 1.3 and trunk, the same result. Do you have any
> idea where could be a problem?
I encounter this error occasionally on ubuntu. Sometimes the error
appears when opening a project, but most times it does not. It doesn't
seem to cause any problems and I can continue working. The error comes
from: qgscoordinatereferencesystem.cpp
int QgsCoordinateReferenceSystem::openDb( QString path, sqlite3 **db )
{
QgsDebugMsg( "path = " + path );
int myResult = sqlite3_open( path.toUtf8().data(), db );
if ( myResult )
{
QgsLogger::critical( "Can't open database: " + QString(
sqlite3_errmsg( *db ) ) );
// XXX This will likely never happen since on open, sqlite creates the
// database if it does not exist.
// ... unfortunately it happens on Windows
QgsMessageOutput* output = QgsMessageOutput::createMessageOutput();
output->setTitle( "Error" );
output->setMessage( "Could not open CRS database " + path +
"<br>Error(" + QString::number( myResult ) + "): " +
QString( sqlite3_errmsg( *db ) ),
QgsMessageOutput::MessageText );
output->showMessage();
}
return myResult;
}
Regards,
Craig
More information about the Qgis-developer
mailing list