SqlCommander, Oracle: Fixed to compile

git-svn-id: svn://ultimatepp.org/upp/trunk@15136 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-09-24 09:07:12 +00:00
parent bffd690e76
commit 546bfb798e
3 changed files with 13 additions and 13 deletions

View file

@ -43,7 +43,7 @@ public:
#ifndef NOAPPSQL
bool OraclePerformScript(const String& text, StatementExecutor& se = SQLStatementExecutor(), Gate<int, int> progress_canceled = false);
#else
bool OraclePerformScript(const String& text, StatementExecutor& se, Gate2<int, int> progress_canceled = false);
bool OraclePerformScript(const String& text, StatementExecutor& se, Gate<int, int> progress_canceled = false);
#endif
Vector<String> OracleSchemaUsers(Sql& cursor);

View file

@ -292,7 +292,7 @@ struct StatementExecutor { // Deprecated, use SqlPerformScript
virtual ~StatementExecutor() {}
};
// Deprecated, use SqlPerforScript
// Deprecated, use SqlPerformScript
typedef bool (*RunScript)(const String& text, StatementExecutor& executor, Gate<int, int> progress_canceled);
class AppSql;
@ -489,6 +489,8 @@ public:
~SqlMassInsert();
};
#ifndef NOAPPSQL
template <class T>
void SqlLoadTable(T& t, SqlId table, SqlId key = SqlId("ID"))
{
@ -537,6 +539,8 @@ void operator*=(VectorMap<K, V>& map, SqlSelect select)
map.Add(sql[0], sql[1]);
}
#endif
// Deprecated, use SqlPerformScript instead
struct StdStatementExecutor : StatementExecutor {
StdStatementExecutor(SqlSession& session) : cursor(session) {}

View file

@ -1,4 +1,3 @@
#include <OleDB/OleDB.h>
#include <SqlCtrl/SqlCtrl.h>
#define HAVE_ORACLE
@ -19,6 +18,7 @@
#if defined(PLATFORM_WIN32) && defined(COMPILER_MSC)
#define HAVE_OLEDB
#include <OleDB/OleDB.h>
#endif
#ifdef HAVE_ORACLE
@ -118,7 +118,7 @@ void SqlCommanderApp::Run() {
Exclamation(NFormat("OCI7 login failed: [* \1%s\1].", oci7->GetLastError()));
continue;
}
session = -oci7;
session = pick(oci7);
}
if(co == "OCI8") {
One<Oracle8> oci8 = new Oracle8;
@ -126,7 +126,7 @@ void SqlCommanderApp::Run() {
Exclamation(NFormat("OCI8 login failed: [* \1%s\1].", oci8->GetLastError()));
continue;
}
session = -oci8;
session = pick(oci8);
}
#endif
#ifdef HAVE_MYSQL
@ -136,7 +136,7 @@ void SqlCommanderApp::Run() {
Exclamation(NFormat("MySql login failed: [* \1%s\1].", mysql->GetLastError()));
continue;
}
session = -mysql;
session = pick(mysql);
}
#endif
#ifdef HAVE_POSTGRESQL
@ -159,7 +159,7 @@ void SqlCommanderApp::Run() {
if(!IsNull(db))
conninfo << "dbname='" << db << "' ";
postgres->Open(conninfo);
session = -postgres;
session = pick(postgres);
}
#endif
#ifdef HAVE_SQLLITE
@ -169,7 +169,7 @@ void SqlCommanderApp::Run() {
Exclamation(NFormat("SQLite3 open failed, (db file = [* \1%s\1]): [* \1%s\1].", db, sqlite->GetLastError()));
continue;
}
session = -sqlite;
session = pick(sqlite);
}
#endif
#ifdef HAVE_OLEDB
@ -180,7 +180,7 @@ void SqlCommanderApp::Run() {
Exclamation(NFormat("OleDB login failed: [* \1%s\1].", oledb->GetLastError()));
continue;
}
session = -oledb;
session = pick(oledb);
}
#endif
if(!session)
@ -195,11 +195,7 @@ void SqlCommanderApp::Run() {
#ifdef flagMAIN
GUI_APP_MAIN
{
// SetLanguage(LNGC_('E', 'N', 'U', 'S', CHARSET_WIN1252));
SetLanguage(LNGC_('C', 'S', 'C', 'Z', CHARSET_WIN1250));
// SetDefaultCharset(CHARSET_WIN1250);
// Draw::XLFDArialFont = "-*-helvetica-*-*-*-*-*-*-*-*-*-*-*-*";
// Draw::SetStdFont(Arial(12));
SqlCommanderApp().Run();
}
#endif//flagMAIN