Patch level : 12.0 no-patch

Files correlati     : f9.exe
Commento            :
- Corretto crezione/aggiornamento automatico tabelle F9
This commit is contained in:
Simone Palacino 2019-09-13 17:51:38 +02:00
parent 30678e55c4
commit 3f5cd89c86
2 changed files with 7 additions and 3 deletions

View File

@ -201,7 +201,9 @@
<MskCompiler Include="..\src\f9\f90100c.uml" />
</ItemGroup>
<ItemGroup>
<SqlCompiler Include="..\src\f9\sql\f90100.sql" />
<SqlCompiler Include="..\src\f9\sql\f90100.sql">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</SqlCompiler>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@ -1252,7 +1252,8 @@ bool TF9_app::create_tables() const
char ver[5] = "0000";
sprintf_s(ver, 5, "%04d", 100);
tabmod.put(TABMOD_SQL_VERSION, ver);
ok &= tabmod.write(); // todo: controllare
tabmod.write(); // todo: controllare
ok &= tabmod.rewrite() == NOERR; // todo: controllare
return ok;
}
@ -1277,7 +1278,7 @@ bool TF9_app::aggiorna_tab_f9(int version) const
string sql;
char ver[5] = "0000";
sprintf_s(ver, 5, "%04d", version);
file << "sql\\f9" << ver << ".sql";
file << "sql\\f90\\f9" << ver << ".sql";
std::ifstream fin;
fin.open(file);
@ -1296,6 +1297,7 @@ bool TF9_app::aggiorna_tab_f9(int version) const
{
TString query; query << sql.c_str();
ok &= fp_db().sq_set_exec(query);
ok &= fp_db().sq_commit();
sql.erase();
}
}