}
// does a record exist?
public String setNotebookGuid(String shareKey, String notebookGuid) {
NSqlQuery query = new NSqlQuery(db.getConnection());
query.prepare("Update LinkedNotebook set notebookGuid=:notebookGuid where shareKey=:shareKey");
query.bindValue(":notebookGuid", notebookGuid);
query.bindValue(":shareKey", shareKey);
if (!query.exec())
logger.log(logger.EXTREME, "Linked notebook SQL retrieve by share name has failed.");
String val = null;
if (query.next())
val = query.valueString(0);
return val;
}