Hi all- I installed firebird 3.0 and am testing it out with soci on windows.
It doesn't want to print the value of count when I do a cout << count. I tried a rowset ..etc. Please let me know if you have any cool ideas. code is below. thanks robo-loki c:\upp\MyApps\socitest>cl.exe /EHsc socitest.cpp -Ic:/upp/MyApps/socitest -Ic:/MYAPPS/firebird/firebird_3_0/include fbclient_ms.lib soci_core_4_0.lib soci_firebird_4_0.lib Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29914 for x64 Copyright (C) Microsoft Corporation. All rights reserved. socitest.cpp Microsoft (R) Incremental Linker Version 14.28.29914.0 Copyright (C) Microsoft Corporation. All rights reserved. /out:socitest.exe socitest.obj fbclient_ms.lib soci_core_4_0.lib soci_firebird_4_0.lib c:\upp\MyApps\socitest>socitest.exe #include "soci.h" #include "soci-firebird.h" #include "soci-backend.h" #include "common.h" #include "soci-compiler.h" #include "soci-config.h" #include "error-firebird.h" #include <iostream> #include <istream> #include <ostream> #include <string> #include <exception> using namespace soci; using namespace std; soci::backend_factory const & backEnd = *factory_firebird(); int main() { try { int count=0; session sql(backEnd,"service=c:/MYAPPS/firebird/firebird_3_0/examples/empbuild/EMPLOYEE.fdb user=sysdba password=mypasswd"); statement st = (sql.prepare <<"select count(*) from employee", into(count)); st.execute(true); cout << count; } catch (firebird_soci_error const &e) { cerr << "Error: " << e.what() << '\n'; } return 0; }
_______________________________________________ soci-users mailing list soci-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/soci-users