diff --git a/DBExample.VC.db b/DBExample.VC.db index 6dcdf36..35b1098 100644 Binary files a/DBExample.VC.db and b/DBExample.VC.db differ diff --git a/DBExample/DBExample.vcxproj b/DBExample/DBExample.vcxproj index f0e6ab7..2d2385b 100644 --- a/DBExample/DBExample.vcxproj +++ b/DBExample/DBExample.vcxproj @@ -74,6 +74,8 @@ true + $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Program Files\Soci\soci_4_0_0\include; + $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64;C:\Program Files\Soci\soci_4_0_0\bun; false @@ -105,7 +107,11 @@ Console true + C:\Program Files\Soci\soci_4_0_0\lib64; + + xcopy "C:\Program Files\Soci\soci_4_0_0\bin\*.dll" "$(TargetDir)" + @@ -142,6 +148,7 @@ + diff --git a/DBExample/DBExample.vcxproj.filters b/DBExample/DBExample.vcxproj.filters index 6a1782f..98bb3cb 100644 --- a/DBExample/DBExample.vcxproj.filters +++ b/DBExample/DBExample.vcxproj.filters @@ -14,4 +14,9 @@ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + Source Files + + \ No newline at end of file diff --git a/DBExample/src/Main.cpp b/DBExample/src/Main.cpp new file mode 100644 index 0000000..0b5c002 --- /dev/null +++ b/DBExample/src/Main.cpp @@ -0,0 +1,34 @@ +#include +#include +#include + + +#include +#include +#include + +#pragma comment(lib, "soci_core_4_0.lib") +#pragma comment(lib, "soci_odbc_4_0.lib") + + +int main() +{ + std::cout << "Hello\n"; + + + try + { + const std::string dsn_path("filedsn=C:\\ViperSQL.dsn"); + + soci::backend_factory const &back_end = *soci::factory_odbc(); + soci::session sql(back_end, dsn_path); + } + catch (std::exception &ex) + { + std::cout << "An error occurred\n"; + std::cout << ex.what() << "\n"; + } + + + return 0; +} \ No newline at end of file