Click here to Skip to main content
16,006,432 members
Home / Discussions / Database
   

Database

 
QuestionMust declare the variable '@TheYear' Pin
sasire1830-Jan-06 19:03
sasire1830-Jan-06 19:03 
AnswerRe: Must declare the variable '@TheYear' Pin
Pankaj Kulkarni30-Jan-06 19:47
Pankaj Kulkarni30-Jan-06 19:47 
AnswerRe: Must declare the variable '@TheYear' Pin
venkat2reddy31-Jan-06 0:47
venkat2reddy31-Jan-06 0:47 
GeneralRe: Must declare the variable '@TheYear' Pin
Colin Angus Mackay31-Jan-06 2:27
Colin Angus Mackay31-Jan-06 2:27 
GeneralRe: Must declare the variable '@TheYear' Pin
sasire1831-Jan-06 3:19
sasire1831-Jan-06 3:19 
QuestionconnectionString update not working Pin
Eugenio Lysei Junior30-Jan-06 12:11
Eugenio Lysei Junior30-Jan-06 12:11 
QuestionHOW TO USE TIMESTAMP Pin
ventomito30-Jan-06 9:48
ventomito30-Jan-06 9:48 
QuestionADO creating 2 connections Pin
Steven G. Weber30-Jan-06 9:20
Steven G. Weber30-Jan-06 9:20 
I'm using ADO to connect via ODBC. Somehow there are two connections being opened at the database server. At first I thought that the problem was connection pooling. After reading many articles from MSDN and others I have tried the solutions to no avail.

I have read that to turn off connection pooling in .NET you use Pooling=False in the connection string. In VB6 you use OLE DB Services=-4. I have also read of other folks using OLE DB Services=-2.

Our DB2 database vendor supplied us with Hummingbird BI-Query. (A modeling, query, reporting tool application). This app does not have the connection problems I am having. I contacted hummingbird for some help with the connection string. They had a trace log but that did not reveal the connection string.


When I step through the code there are 2 connections opened on the cn.Open method. When the cn.Close method is executed only one of the connections is closed. In .NET I have tried to force garbadge collection. This has not worked. However, when the .NET app closes the connection closes. The VB6 app does not do this.



As a test in in VB.NET very simply I do:

<br />
Dim cn As OdbcConnection<br />
<br />
cn = New OdbcConnection<br />
<br />
cn.ConnectionString = "DSN=MyDSN" _<br />
           & "; uid=MyUID; pwd=MyPwd; Pooling=False"<br />
<br />
cn.Open()<br />
cn.Close()<br />



In VB6 very simply I do:

<br />
Dim cn As ADODB.Connection<br />
<br />
Set cn = New ADODB.Connection<br />
<br />
cn.ConnectionString = "DSN=MyDSN" _<br />
           & "; uid=MyUID; pwd=MyPwd;OLE DB Services=-2"<br />
<br />
cn.Open<br />
cn.Close<br />
<br />
set cn = Nothing<br />
<br />



Thanks for your help,

Steve
QuestionMoving a SQL database Pin
dptalt30-Jan-06 5:54
dptalt30-Jan-06 5:54 
AnswerRe: Moving a SQL database Pin
Colin Angus Mackay30-Jan-06 6:52
Colin Angus Mackay30-Jan-06 6:52 
GeneralRe: Moving a SQL database Pin
shaz jazz1-Jul-06 2:17
shaz jazz1-Jul-06 2:17 
GeneralRe: Moving a SQL database Pin
Colin Angus Mackay1-Jul-06 2:37
Colin Angus Mackay1-Jul-06 2:37 
QuestionRecursive Data Pin
Bassam Saoud30-Jan-06 5:06
Bassam Saoud30-Jan-06 5:06 
AnswerRe: Recursive Data Pin
Damodar Periwal3-Feb-06 14:01
Damodar Periwal3-Feb-06 14:01 
QuestionHow to get SqlTypes of a particular column in sqlserver using C# Pin
YogeshChoudhary30-Jan-06 0:59
YogeshChoudhary30-Jan-06 0:59 
QuestionHow to generate a sql db from a xml file Pin
User 231751430-Jan-06 0:58
User 231751430-Jan-06 0:58 
Questionupdate problem Pin
kings_128-Jan-06 15:57
kings_128-Jan-06 15:57 
QuestionCertain Numbr of records Pin
gharry28-Jan-06 3:36
gharry28-Jan-06 3:36 
AnswerRe: Certain Numbr of records Pin
Colin Angus Mackay28-Jan-06 6:01
Colin Angus Mackay28-Jan-06 6:01 
QuestionAutonumber in MS Access Pin
alfakappasigma27-Jan-06 23:49
alfakappasigma27-Jan-06 23:49 
AnswerRe: Autonumber in MS Access Pin
Pankaj Kulkarni30-Jan-06 0:47
Pankaj Kulkarni30-Jan-06 0:47 
GeneralRe: Autonumber in MS Access Pin
alfakappasigma31-Jan-06 6:43
alfakappasigma31-Jan-06 6:43 
GeneralRe: Autonumber in MS Access Pin
Luis Alonso Ramos31-Jan-06 7:58
Luis Alonso Ramos31-Jan-06 7:58 
GeneralRe: Autonumber in MS Access Pin
alfakappasigma2-Feb-06 7:38
alfakappasigma2-Feb-06 7:38 
QuestionGet Highest Value.... Pin
Sasmi27-Jan-06 2:55
Sasmi27-Jan-06 2:55 

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.