Patch level : 4.0 nopatch
Files correlati : crpa0.exe Ricompilazione Demo : [ ] Commento : supporto ODBC git-svn-id: svn://10.65.10.50/trunk@16189 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
d096813c81
commit
45d6a5ffce
@ -1,6 +1,7 @@
|
|||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
#include <dongle.h>
|
#include <dongle.h>
|
||||||
#include <execp.h>
|
#include <execp.h>
|
||||||
|
#include <odbcrset.h>
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
|
|
||||||
@ -1130,6 +1131,9 @@ void TIni2Sql::main_loop()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int err = 0;
|
||||||
|
|
||||||
if (_sqlfile != NULL)
|
if (_sqlfile != NULL)
|
||||||
{
|
{
|
||||||
_sqlfile->flush();
|
_sqlfile->flush();
|
||||||
@ -1145,6 +1149,30 @@ void TIni2Sql::main_loop()
|
|||||||
TExternal_app esegui_sql(rigapar);
|
TExternal_app esegui_sql(rigapar);
|
||||||
esegui_sql.run();
|
esegui_sql.run();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ifstream f("crpa.sql");
|
||||||
|
TString query;
|
||||||
|
TString header;
|
||||||
|
TString & buffer = get_tmp_string(4096);
|
||||||
|
char * b = buffer.get_buffer(4096);
|
||||||
|
|
||||||
|
header << "ODBC(" << _configfile->get("Connect") << ',' << _configfile->get("Username") << ',' <<_configfile->get("Password") << ")\n";
|
||||||
|
|
||||||
|
TODBC_recordset pmc40(header);
|
||||||
|
|
||||||
|
while (f.good())
|
||||||
|
{
|
||||||
|
f.getline(b, 4096);
|
||||||
|
query << buffer;
|
||||||
|
}
|
||||||
|
int err = pmc40.exec(query);
|
||||||
|
if (err != 0)
|
||||||
|
{
|
||||||
|
_inputfile->set("Result", "Error", "Transaction");
|
||||||
|
_inputfile->set("Error", err, "Transaction");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// non devo scrivere niente nelle tavole oracle
|
// non devo scrivere niente nelle tavole oracle
|
||||||
// ma devo comunque segnalare come eseguita la transazione altrimenti rimane nel postino
|
// ma devo comunque segnalare come eseguita la transazione altrimenti rimane nel postino
|
||||||
|
Loading…
x
Reference in New Issue
Block a user