Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

数据库初始化 #6

Open
robustwellcao opened this issue Jun 23, 2020 · 1 comment
Open

数据库初始化 #6

robustwellcao opened this issue Jun 23, 2020 · 1 comment

Comments

@robustwellcao
Copy link

您好,我希望在一个类里用qtl::odbc::database db;qtl::sqlite::database db;qtl::mysql::database db;,都用db。请问.cpp文件和.h文件如何写,谢谢!

@znone
Copy link
Owner

znone commented Jun 28, 2020

这三种database是不同的类,应该分别使用不用的变量。如果你需要做一个通用的数据库访问程序,可以仅使用odbc,然后通过sqlite、mysql,以及其他数据库的odbc驱动去访问这两种数据库。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants