Click here to Skip to main content
15,891,633 members
Home / Discussions / Database
   

Database

 
GeneralSQL Server Pin
hung_ngole21-Aug-05 18:59
hung_ngole21-Aug-05 18:59 
GeneralRe: SQL Server Pin
Christian Graus21-Aug-05 19:23
protectorChristian Graus21-Aug-05 19:23 
GeneralRe: SQL Server Pin
Colin Angus Mackay21-Aug-05 23:01
Colin Angus Mackay21-Aug-05 23:01 
GeneralRe: SQL Server Pin
Mandar Patankar22-Aug-05 5:24
Mandar Patankar22-Aug-05 5:24 
GeneralRe: SQL Server Pin
Frank Kerrigan23-Aug-05 0:46
Frank Kerrigan23-Aug-05 0:46 
Generalform of access Pin
vtalau21-Aug-05 16:27
vtalau21-Aug-05 16:27 
GeneralADO Practicalities & Errors Pin
Peter Weyzen21-Aug-05 5:52
Peter Weyzen21-Aug-05 5:52 
GeneralRe: ADO Practicalities & Errors Pin
Mike Dimmick22-Aug-05 0:52
Mike Dimmick22-Aug-05 0:52 
I've never experienced this problem.

Normally, the recommended pattern is to create a connection for each operation or small group of related operations. With connection pooling enabled (the default), ADO will keep the physical connection open so it can be reused as required, creating additional connections only as they're needed. Connections that have been idle for a long time will eventually be disconnected.

Most connection objects are not thread-safe, IIRC. If there's a chance you're using your single connection object from multiple threads concurrently, this could well be causing your errors. Switching to a connection-per-operation model should sort this problem out.

In fact the ADO Connection object is marked as Apartment threaded. If you're using the correct operations to pass interface pointers between threads in a multithreaded program, calling a Connection object method will cause COM to marshal the call back to the thread that created the object. If you're not doing it properly, passing raw pointers around, then you could well be corrupting the internal state of the object.

Stability. What an interesting concept. -- Chris Maunder
GeneralRe: ADO Practicalities & Errors Pin
Peter Weyzen22-Aug-05 5:53
Peter Weyzen22-Aug-05 5:53 
Generalhelp me with triggers Pin
m.rastgar21-Aug-05 0:45
m.rastgar21-Aug-05 0:45 
GeneralRe: help me with triggers Pin
airbus38021-Aug-05 2:29
airbus38021-Aug-05 2:29 
GeneralHelp with Sql statement Pin
MeterMan20-Aug-05 15:44
MeterMan20-Aug-05 15:44 
GeneralRe: Help with Sql statement Pin
miah alom21-Aug-05 5:46
miah alom21-Aug-05 5:46 
GeneralAccess to mySQL Pin
Anonymous20-Aug-05 8:19
Anonymous20-Aug-05 8:19 
GeneralRe: Access to mySQL Pin
Santanu Lahiri23-Aug-05 11:28
Santanu Lahiri23-Aug-05 11:28 
GeneralXML Database Pin
surfman1919-Aug-05 11:03
surfman1919-Aug-05 11:03 
GeneralRe: XML Database Pin
Colin Angus Mackay20-Aug-05 6:29
Colin Angus Mackay20-Aug-05 6:29 
GeneralRe: XML Database Pin
surfman1920-Aug-05 12:41
surfman1920-Aug-05 12:41 
GeneralRe: XML Database Pin
Colin Angus Mackay20-Aug-05 23:03
Colin Angus Mackay20-Aug-05 23:03 
GeneralRe: XML Database Pin
Frank Kerrigan23-Aug-05 0:15
Frank Kerrigan23-Aug-05 0:15 
QuestionNewbie: ODBC or OleDb SQL Command Dictionary? Pin
zPaul19-Aug-05 9:49
zPaul19-Aug-05 9:49 
GeneralDataGrid bounded to a DataTable with composite key Pin
miah alom19-Aug-05 7:33
miah alom19-Aug-05 7:33 
Generaldropdownlist in datagrid Pin
sarah_chandran19-Aug-05 1:01
sarah_chandran19-Aug-05 1:01 
GeneralRe: dropdownlist in datagrid Pin
miah alom19-Aug-05 6:24
miah alom19-Aug-05 6:24 
GeneralHELP unable to connect to sql server Pin
christy1818-Aug-05 23:56
christy1818-Aug-05 23:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.