Click here to Skip to main content
15,845,681 members
Home / Discussions / Database
   

Database

 
GeneralSQL Server Pin
hung_ngole21-Aug-05 19:59
hung_ngole21-Aug-05 19:59 
GeneralRe: SQL Server Pin
Christian Graus21-Aug-05 20:23
protectorChristian Graus21-Aug-05 20:23 
GeneralRe: SQL Server Pin
Colin Angus Mackay22-Aug-05 0:01
Colin Angus Mackay22-Aug-05 0:01 
GeneralRe: SQL Server Pin
Mandar Patankar22-Aug-05 6:24
Mandar Patankar22-Aug-05 6:24 
GeneralRe: SQL Server Pin
Frank Kerrigan23-Aug-05 1:46
Frank Kerrigan23-Aug-05 1:46 
Generalform of access Pin
vtalau21-Aug-05 17:27
vtalau21-Aug-05 17:27 
GeneralADO Practicalities & Errors Pin
Peter Weyzen21-Aug-05 6:52
Peter Weyzen21-Aug-05 6:52 
GeneralRe: ADO Practicalities & Errors Pin
Mike Dimmick22-Aug-05 1:52
Mike Dimmick22-Aug-05 1: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 6:53
Peter Weyzen22-Aug-05 6:53 
Generalhelp me with triggers Pin
m.rastgar21-Aug-05 1:45
m.rastgar21-Aug-05 1:45 
GeneralRe: help me with triggers Pin
airbus38021-Aug-05 3:29
airbus38021-Aug-05 3:29 
GeneralHelp with Sql statement Pin
MeterMan20-Aug-05 16:44
MeterMan20-Aug-05 16:44 
GeneralRe: Help with Sql statement Pin
miah alom21-Aug-05 6:46
miah alom21-Aug-05 6:46 
GeneralAccess to mySQL Pin
Anonymous20-Aug-05 9:19
Anonymous20-Aug-05 9:19 
GeneralRe: Access to mySQL Pin
Santanu Lahiri23-Aug-05 12:28
Santanu Lahiri23-Aug-05 12:28 
GeneralXML Database Pin
surfman1919-Aug-05 12:03
surfman1919-Aug-05 12:03 
GeneralRe: XML Database Pin
Colin Angus Mackay20-Aug-05 7:29
Colin Angus Mackay20-Aug-05 7:29 
GeneralRe: XML Database Pin
surfman1920-Aug-05 13:41
surfman1920-Aug-05 13:41 
GeneralRe: XML Database Pin
Colin Angus Mackay21-Aug-05 0:03
Colin Angus Mackay21-Aug-05 0:03 
GeneralRe: XML Database Pin
Frank Kerrigan23-Aug-05 1:15
Frank Kerrigan23-Aug-05 1:15 
QuestionNewbie: ODBC or OleDb SQL Command Dictionary? Pin
zPaul19-Aug-05 10:49
zPaul19-Aug-05 10:49 
GeneralDataGrid bounded to a DataTable with composite key Pin
miah alom19-Aug-05 8:33
miah alom19-Aug-05 8:33 
Generaldropdownlist in datagrid Pin
sarah_chandran19-Aug-05 2:01
sarah_chandran19-Aug-05 2:01 
GeneralRe: dropdownlist in datagrid Pin
miah alom19-Aug-05 7:24
miah alom19-Aug-05 7:24 
GeneralHELP unable to connect to sql server Pin
christy1819-Aug-05 0:56
christy1819-Aug-05 0: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.