【问题标题】:Executing sql script in c++在 C++ 中执行 sql 脚本
【发布时间】:2014-04-16 09:58:13
【问题描述】:

我是 SQL 新手。是否可以在 C++ 中使用某些库来执行

之类的 sql 命令
    std::shared_ptr<database> ptr( new odb::sqlite::database ("database.db",      
    SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE));
    //the above line contains the  pointer and the lower line contains the function that executes the query on the databse with the pointer
    executesql("select * from tablea where x> y ", ptr);

因为发生在我身上的事情是我从另一台机器以“从等...所以。

【问题讨论】:

  • 这样的C++库还有很多。
  • 寻找图书馆的问题are off-topic。某个特定库是否适合某些特定要求的问题将成为热门话题。

标签: c++ mysql sql sql-server sqlite


【解决方案1】:

我终于找到了答案。 它在以下链接中给出了很多详细信息。 http://www.codeproject.com/Tips/378808/Accessing-a-SQLite-Database-with-Cplusplus.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多