c - ODBC - multiple connections from one app to the same data source -
i vaguely remember reading somewhere (in msdn odbc documentation?) 1 application cannot make more 1 connection single data source. seemed me need 1 connection threads of application have share. trying information up, can't seem find anymore. know/remember how works?
might become problem in our app, since of threads dynamically connect data sources of choice. don't want see random connection errors if 2 of them connect @ same time 1 source, wanted double check info.
maybe statement referring in the msdn documentation, 1 says 1 statement can active on single connection. says:
multiple active statements per connection
after sql server has received statement, sql server tds protocol not allow acceptance of other statements connection until 1 of following occurs:
- the client application processes entire result set.
- the client sends statement telling server can close remainder of result set.
this means when odbc application using default result set, sql server not support multiple active statement handles on connection handle , 1 statement can actively processed @ point in time.
when odbc application using api server cursors, however, driver can support multiple active statements on connection. when rowset each cursor command has been received @ client, sql server considers statement have completed, , accepts statement statement handle on connection handle.
multiple connections fine. multiple statements per connection, not fine.
Comments
Post a Comment