我应该对多个连接使用单个 ODBC 环境吗?
我正在学习 ODBC,我的应用程序需要同时使用多个连接。我应该分配一个环境,然后从中分配多个连接吗?
或者每个连接的环境?
非常感谢!
I'm learning ODBC, and my application needs to use multiple connections concurrently. Should I be allocating a single environment, and then multiple connections from this?
Or an environment for each connection?
Many thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定创建多个环境有什么好处,除非您要在环境级别进行更改,例如,在每个环境句柄上使用不同的参数调用 SQLSetEnvAttr。
I'm not sure there is anything to be gained from creating multiple environments unless you are going to change something at the environment level e.g., call SQLSetEnvAttr with different arguments on each environment handle.