Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Connection not closing

3 posts in General Discussion Last posting was on 2003-04-25 18:05:41.0Z
Richard Posted on 2003-04-25 17:05:50.0Z
From: Richard
Date: Fri, 25 Apr 2003 13:05:50 -0400
Newsgroups: ianywhere.public.general
Subject: Connection not closing
Message-ID: <404A7B2D4E271871005DEAA085256D13.005DEB2685256D13@webforums>
Lines: 58
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub ianywhere.public.general:952
Article PK: 3991

I am using a Disconnected Recordset with the following code and it is not
releasing the connection...any ideas? Do I need to set the connection
properties to something different (see connection property values below

Thanks!
Richard

CODE:
Dim SQL As String

'Instance Object Variables
Set goConn = New ADODB.Connection
Set rstTemp = New ADODB.Recordset

' Open connection
goConn.Provider = "ASAProv"
goConn.ConnectionString =
"DBF=C:\Richard\Data\Test8.db;;INTEGRATED=NO;User ID=lds;Password=lds;"
goConn.Open

' Have to use Table or View for Disconnected Recordset
SQL = "SELECT * FROM DBA.vw_Adm_UserFeatures WHERE UserName = '" &
UserID & "'"
rstTemp.CursorLocation = adUseClient 'Must be Client Side cursor for
Disconnected Recordset
rstTemp.Open SQL, goConn, adOpenStatic, adLockBatchOptimistic,
adCmdText
rstTemp.ActiveConnection = Nothing 'Disconnect the Recordset from
the Connection

goConn.Close
Set goConn = Nothing ' <<<WHEN I DEBUG CONNECTION NOT RELEASED


CONNECTION PROPERTIES:
====== Name : Value : Attributes : Type ==========
Cache Authentication : True : 1537 : 11
Encrypt Password : False : 1537 : 11
Integrated Security : SSPI : 1537 : 8
Mask Password : False : 1537 : 11
Password : : 1537 : 8
Persist Encrypted : True : 1537 : 11
Persist Security Info : : 1537 : 11
User ID : : 1537 : 8
Asynchronous Processing : 0 : 513 : 3
Initial Catalog : : 1537 : 8
Data Source : : 1537 : 8
Window Handle : 0 : 1537 : 3
Impersonation Level : 1 : 1537 : 3
Locale Identifier : 0 : 1537 : 3
Location : : 1537 : 8
Mode : 3 : 513 : 3
OLE DB Services : -5 : 1537 : 3
Prompt : 4 : 1537 : 2
Protection Level : 0 : 1537 : 3
Extended Properties : : 1537 : 8
Connect Timeout : 15 : 1537 : 3
ASA Multiple Results : False : 1537 : 11
====== Name : Value : Attributes : Type ==========


Chris Keating (iAnywhere Solutions) Posted on 2003-04-25 16:52:22.0Z
From: "Chris Keating \(iAnywhere Solutions\)" <keating@iAnywhere.com>
References: <404A7B2D4E271871005DEAA085256D13.005DEB2685256D13@webforums>
Subject: Re: Connection not closing
Date: Fri, 25 Apr 2003 12:52:22 -0400
Lines: 78
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <OY1#0t0CDHA.220@forums-1-dub>
Newsgroups: ianywhere.public.general
NNTP-Posting-Host: keating-xp.sybase.com 172.31.140.19
Path: forums-1-dub!forums-master.sybase.com!forums-1-dub.sybase.com
Xref: forums-1-dub ianywhere.public.general:953
Article PK: 2952

Works as expected in 8.0.2.4234. What version are you using?

--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8
iAnywhere Solutions http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com

<Richard> wrote in message
news:404A7B2D4E271871005DEAA085256D13.005DEB2685256D13@webforums...
> I am using a Disconnected Recordset with the following code and it is not
> releasing the connection...any ideas? Do I need to set the connection
> properties to something different (see connection property values below
>
> Thanks!
> Richard
>
> CODE:
> Dim SQL As String
>
> 'Instance Object Variables
> Set goConn = New ADODB.Connection
> Set rstTemp = New ADODB.Recordset
>
> ' Open connection
> goConn.Provider = "ASAProv"
> goConn.ConnectionString =
> "DBF=C:\Richard\Data\Test8.db;;INTEGRATED=NO;User ID=lds;Password=lds;"
> goConn.Open
>
> ' Have to use Table or View for Disconnected Recordset
> SQL = "SELECT * FROM DBA.vw_Adm_UserFeatures WHERE UserName = '" &
> UserID & "'"
> rstTemp.CursorLocation = adUseClient 'Must be Client Side cursor
for
> Disconnected Recordset
> rstTemp.Open SQL, goConn, adOpenStatic, adLockBatchOptimistic,
> adCmdText
> rstTemp.ActiveConnection = Nothing 'Disconnect the Recordset from
> the Connection
>
> goConn.Close
> Set goConn = Nothing ' <<<WHEN I DEBUG CONNECTION NOT RELEASED
>
>
> CONNECTION PROPERTIES:
> ====== Name : Value : Attributes : Type ==========
> Cache Authentication : True : 1537 : 11
> Encrypt Password : False : 1537 : 11
> Integrated Security : SSPI : 1537 : 8
> Mask Password : False : 1537 : 11
> Password : : 1537 : 8
> Persist Encrypted : True : 1537 : 11
> Persist Security Info : : 1537 : 11
> User ID : : 1537 : 8
> Asynchronous Processing : 0 : 513 : 3
> Initial Catalog : : 1537 : 8
> Data Source : : 1537 : 8
> Window Handle : 0 : 1537 : 3
> Impersonation Level : 1 : 1537 : 3
> Locale Identifier : 0 : 1537 : 3
> Location : : 1537 : 8
> Mode : 3 : 513 : 3
> OLE DB Services : -5 : 1537 : 3
> Prompt : 4 : 1537 : 2
> Protection Level : 0 : 1537 : 3
> Extended Properties : : 1537 : 8
> Connect Timeout : 15 : 1537 : 3
> ASA Multiple Results : False : 1537 : 11
> ====== Name : Value : Attributes : Type ==========


Richard Posted on 2003-04-25 18:05:41.0Z
From: Richard
Date: Fri, 25 Apr 2003 14:05:41 -0400
Newsgroups: ianywhere.public.general
Subject: Re: Connection not closing
Message-ID: <617DED24D022D356006365BC85256D13.0061D11685256D13@webforums>
References: <404A7B2D4E271871005DEAA085256D13.005DEB2685256D13@webforums> <OY1#0t0CDHA.220@forums-1-dub>
Lines: 4
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub ianywhere.public.general:954
Article PK: 3322

I am using 8.0.2.4218 most of our customers are using latest version of 7

Thanks
Richard