Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/lintest/myrulib.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKandrashin Denis <mail@lintest.ru>2013-01-10 17:03:20 +0400
committerKandrashin Denis <mail@lintest.ru>2013-01-10 17:03:20 +0400
commitb59ffdaa5417be68c49b2b29b6621e6a14a9efc0 (patch)
tree96526d3a3da2fac4f8d337edf4f10bd252456299
parentf3f865dfdd59edee789847759b7c0506aa877d86 (diff)
Fix SQL error in sequence frame
-rw-r--r--sources/MyRuLib/frames/FbFrameSeqn.cpp6
-rw-r--r--sources/MyRuLib/models/FbSeqnList.cpp8
2 files changed, 7 insertions, 7 deletions
diff --git a/sources/MyRuLib/frames/FbFrameSeqn.cpp b/sources/MyRuLib/frames/FbFrameSeqn.cpp
index 9c5d3bfb..a9e8a9d5 100644
--- a/sources/MyRuLib/frames/FbFrameSeqn.cpp
+++ b/sources/MyRuLib/frames/FbFrameSeqn.cpp
@@ -66,9 +66,9 @@ void FbSeqnViewCtrl::OnMasterDelete(wxCommandEvent& event)
if (ok) {
FbCommonDatabase database;
FbAutoCommit commit(database);
- database.ExecuteUpdate(wxString::Format(wxT("DELETE FROM s WHERE sid=%d"), id));
- database.ExecuteUpdate(wxString::Format(wxT("DELETE FROM bs WHERE sid=%d"), id));
- database.ExecuteUpdate(wxString::Format(wxT("DELETE FROM fts_s WHERE docid=%d"), id));
+ database.ExecuteUpdate(wxString::Format(wxT("DELETE FROM sequences WHERE id=%d"), id));
+ database.ExecuteUpdate(wxString::Format(wxT("DELETE FROM bookseq WHERE id_seq=%d"), id));
+ database.ExecuteUpdate(wxString::Format(wxT("DELETE FROM fts_seqn WHERE docid=%d"), id));
Delete();
}
}
diff --git a/sources/MyRuLib/models/FbSeqnList.cpp b/sources/MyRuLib/models/FbSeqnList.cpp
index 585b20ef..eefe14c8 100644
--- a/sources/MyRuLib/models/FbSeqnList.cpp
+++ b/sources/MyRuLib/models/FbSeqnList.cpp
@@ -87,7 +87,7 @@ void FbSeqnListThread::MakeModel(wxSQLite3ResultSet &result)
wxString FbSeqnListThread::GetJoin()
{
- return abs(m_order) > 1 ? wxT(" LEFT JOIN cnt.numb ON id=numb.key ") : wxString(wxT(' '));
+ return abs(m_order) > 1 ? wxT(" LEFT JOIN numb ON id=numb.key ") : wxString(wxT(' '));
}
wxString FbSeqnListThread::GetOrder()
@@ -195,7 +195,7 @@ int FbSeqnListModel::GetCount(int code)
}
void FbSeqnListModel::SetCounter(const wxString & filename)
-{
- if (!filename.IsEmpty()) m_database.Open(filename);
- m_counter.clear();
+{
+ if (!filename.IsEmpty()) m_database.Open(filename);
+ m_counter.clear();
}