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 hanging on

6 posts in OLEDB Last posting was on 2008-04-02 22:48:39.0Z
Col Posted on 2008-03-27 23:41:03.0Z
From: "Col" <txtngo@hotmail.com>
Newsgroups: advantage.oledb
Subject: Connection hanging on
Date: Fri, 28 Mar 2008 09:41:03 +1000
Lines: 1
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 12.0.1606
X-MimeOLE: Produced By Microsoft MimeOLE V12.0.1606
NNTP-Posting-Host: 60.242.255.160
Message-ID: <47ec2f3b@solutions.advantagedatabase.com>
X-Trace: 27 Mar 2008 17:35:23 -0700, 60.242.255.160
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!60.242.255.160
Xref: solutions.advantagedatabase.com Advantage.OLEDB:1261
Article PK: 1133781

Hi All,
I have a vs2005 app (vb) that connects to a table with oledb and adds a
record

strSRC="L:\ADSDATA"
strTBL="LIVEDTA"
connDST = New ADODB.Connection
rd = New ADODB.Recordset

connDST.Open("Provider=Advantage.OLEDB.1;Data Source=" & strSRC &
";ServerType=ADS_REMOTE_SERVER;TableType=ADS_CDX")
With rd
.ActiveConnection = connDST
.CursorLocation = 3
.CursorType = 1
.Open(strTBL, connDST, 1, 3, adCmdTable)
End With
rd.AddNew()
snip.......

rd.Update()
rd.Close()
connDST.Close()

It then calls an xharbour app to create an index for the table
x = Shell("Y:\CREATCDX " & strSCR & "\" & strTBL & " " & strTBL & "
CUSTNO", 1)
but this fails due to not having exclusive access to the table.

How long is it between closing the connection and freeing the table?
Is there a better way to do this.

Regards
Col


Mark Wilkins Posted on 2008-03-31 18:00:09.0Z
From: "Mark Wilkins" <mark@no.email>
Newsgroups: advantage.oledb
References: <47ec2f3b@solutions.advantagedatabase.com>
Subject: Re: Connection hanging on
Date: Mon, 31 Mar 2008 12:00:09 -0600
Lines: 51
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
NNTP-Posting-Host: 10.24.38.228
Message-ID: <47f12553@solutions.advantagedatabase.com>
X-Trace: 31 Mar 2008 11:54:27 -0700, 10.24.38.228
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!10.24.38.228
Xref: solutions.advantagedatabase.com Advantage.OLEDB:1262
Article PK: 1133782

Hi Col,

I suspect that this is due to connection pooling by ADO. There is an
article (http://msdn2.microsoft.com/en-us/library/ms810829.aspx) that
describes this. I think you can add "OLE DB Services = -2;" to the
connection string to turn off the pooling. I believe it can also be
disabled via a registry setting.

Mark Wilkins
Advantage R&D

"Col" <txtngo@hotmail.com> wrote in message
news:47ec2f3b@solutions.advantagedatabase.com...
> Hi All,
> I have a vs2005 app (vb) that connects to a table with oledb and adds a
> record
>
> strSRC="L:\ADSDATA"
> strTBL="LIVEDTA"
> connDST = New ADODB.Connection
> rd = New ADODB.Recordset
>
> connDST.Open("Provider=Advantage.OLEDB.1;Data Source=" & strSRC &
> ";ServerType=ADS_REMOTE_SERVER;TableType=ADS_CDX")
> With rd
> .ActiveConnection = connDST
> .CursorLocation = 3
> .CursorType = 1
> .Open(strTBL, connDST, 1, 3, adCmdTable)
> End With
> rd.AddNew()
> snip.......
>
> rd.Update()
> rd.Close()
> connDST.Close()
>
> It then calls an xharbour app to create an index for the table
> x = Shell("Y:\CREATCDX " & strSCR & "\" & strTBL & " " & strTBL & "
> CUSTNO", 1)
> but this fails due to not having exclusive access to the table.
>
> How long is it between closing the connection and freeing the table?
> Is there a better way to do this.
>
> Regards
> Col


Edgar Sherman Posted on 2008-03-31 18:00:16.0Z
Date: Mon, 31 Mar 2008 12:00:16 -0600
From: Edgar Sherman <no@email.com>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
Newsgroups: advantage.oledb
Subject: Re: Connection hanging on
References: <47ec2f3b@solutions.advantagedatabase.com>
In-Reply-To: <47ec2f3b@solutions.advantagedatabase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 10.24.34.133
Message-ID: <47f12559@solutions.advantagedatabase.com>
X-Trace: 31 Mar 2008 11:54:33 -0700, 10.24.34.133
Lines: 41
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!10.24.34.133
Xref: solutions.advantagedatabase.com Advantage.OLEDB:1263
Article PK: 1133784

Closing the connection should close the table immediately. Do you still
see your same connection active after the close? Could it be that some
other user has this table open?

Edgar

Col wrote:
> Hi All,
> I have a vs2005 app (vb) that connects to a table with oledb and adds a
> record
>
> strSRC="L:\ADSDATA"
> strTBL="LIVEDTA"
> connDST = New ADODB.Connection
> rd = New ADODB.Recordset
>
> connDST.Open("Provider=Advantage.OLEDB.1;Data Source=" & strSRC &
> ";ServerType=ADS_REMOTE_SERVER;TableType=ADS_CDX")
> With rd
> .ActiveConnection = connDST
> .CursorLocation = 3
> .CursorType = 1
> .Open(strTBL, connDST, 1, 3, adCmdTable)
> End With
> rd.AddNew()
> snip.......
>
> rd.Update()
> rd.Close()
> connDST.Close()
>
> It then calls an xharbour app to create an index for the table
> x = Shell("Y:\CREATCDX " & strSCR & "\" & strTBL & " " & strTBL &
> " CUSTNO", 1)
> but this fails due to not having exclusive access to the table.
>
> How long is it between closing the connection and freeing the table?
> Is there a better way to do this.
>
> Regards
> Col


Col Posted on 2008-04-02 00:47:13.0Z
From: "Col" <txtngo@hotmail.com>
Newsgroups: advantage.oledb
References: <47ec2f3b@solutions.advantagedatabase.com> <47f12559@solutions.advantagedatabase.com>
Subject: Re: Connection hanging on
Date: Wed, 2 Apr 2008 10:47:13 +1000
Lines: 3
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 12.0.1606
X-MimeOLE: Produced By Microsoft MimeOLE V12.0.1606
NNTP-Posting-Host: 60.242.255.160
Message-ID: <47f2d642@solutions.advantagedatabase.com>
X-Trace: 1 Apr 2008 18:41:38 -0700, 60.242.255.160
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!60.242.255.160
Xref: solutions.advantagedatabase.com Advantage.OLEDB:1264
Article PK: 1133783

Thanks for your reply,

After the table is closed and the connection closed, the Advantage Data
Architect shows that I am the only connected user.
I tried "OLE DB Services = -2;" but this made no change.

Regards
Col

"Edgar Sherman" <no@email.com> wrote in message
news:47f12559@solutions.advantagedatabase.com...
> Closing the connection should close the table immediately. Do you still
> see your same connection active after the close? Could it be that some
> other user has this table open?
>
> Edgar
>
> Col wrote:
>> Hi All,
>> I have a vs2005 app (vb) that connects to a table with oledb and adds a
>> record
>>
>> strSRC="L:\ADSDATA"
>> strTBL="LIVEDTA"
>> connDST = New ADODB.Connection
>> rd = New ADODB.Recordset
>>
>> connDST.Open("Provider=Advantage.OLEDB.1;Data Source=" & strSRC &
>> ";ServerType=ADS_REMOTE_SERVER;TableType=ADS_CDX")
>> With rd
>> .ActiveConnection = connDST
>> .CursorLocation = 3
>> .CursorType = 1
>> .Open(strTBL, connDST, 1, 3, adCmdTable)
>> End With
>> rd.AddNew()
>> snip.......
>>
>> rd.Update()
>> rd.Close()
>> connDST.Close()
>>
>> It then calls an xharbour app to create an index for the table
>> x = Shell("Y:\CREATCDX " & strSCR & "\" & strTBL & " " & strTBL &
>> " CUSTNO", 1)
>> but this fails due to not having exclusive access to the table.
>>
>> How long is it between closing the connection and freeing the table?
>> Is there a better way to do this.
>>
>> Regards
>> Col


Edgar Sherman Posted on 2008-04-02 17:43:55.0Z
Date: Wed, 02 Apr 2008 11:43:55 -0600
From: Edgar Sherman <no@email.com>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
Newsgroups: advantage.oledb
Subject: Re: Connection hanging on
References: <47ec2f3b@solutions.advantagedatabase.com> <47f12559@solutions.advantagedatabase.com> <47f2d642@solutions.advantagedatabase.com>
In-Reply-To: <47f2d642@solutions.advantagedatabase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 10.24.34.133
Message-ID: <47f3c482@solutions.advantagedatabase.com>
X-Trace: 2 Apr 2008 11:38:10 -0700, 10.24.34.133
Lines: 66
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!10.24.34.133
Xref: solutions.advantagedatabase.com Advantage.OLEDB:1265
Article PK: 1133785

Does ARC only show the one ARC connection, or does the other connection
(from the OLEDB app) stay connected? Are the tables still showing as in
use under "Open Files" Tab?

If pooling is truly the issue, setting this to -2 *should* help, however
I did a quick search on the KB and I see we had recommended in the past
setting it to -4. You might give this a try. -4 will enable all
services except pooling and auto-enlistment.

Edgar

Col wrote:
> Thanks for your reply,
>
> After the table is closed and the connection closed, the Advantage Data
> Architect shows that I am the only connected user.
> I tried "OLE DB Services = -2;" but this made no change.
>
> Regards
> Col
>
>
> "Edgar Sherman" <no@email.com> wrote in message
> news:47f12559@solutions.advantagedatabase.com...
>> Closing the connection should close the table immediately. Do you
>> still see your same connection active after the close? Could it be
>> that some other user has this table open?
>>
>> Edgar
>>
>> Col wrote:
>>> Hi All,
>>> I have a vs2005 app (vb) that connects to a table with oledb and adds
>>> a record
>>>
>>> strSRC="L:\ADSDATA"
>>> strTBL="LIVEDTA"
>>> connDST = New ADODB.Connection
>>> rd = New ADODB.Recordset
>>>
>>> connDST.Open("Provider=Advantage.OLEDB.1;Data Source=" &
>>> strSRC & ";ServerType=ADS_REMOTE_SERVER;TableType=ADS_CDX")
>>> With rd
>>> .ActiveConnection = connDST
>>> .CursorLocation = 3
>>> .CursorType = 1
>>> .Open(strTBL, connDST, 1, 3, adCmdTable)
>>> End With
>>> rd.AddNew()
>>> snip.......
>>>
>>> rd.Update()
>>> rd.Close()
>>> connDST.Close()
>>>
>>> It then calls an xharbour app to create an index for the table
>>> x = Shell("Y:\CREATCDX " & strSCR & "\" & strTBL & " " &
>>> strTBL & " CUSTNO", 1)
>>> but this fails due to not having exclusive access to the table.
>>>
>>> How long is it between closing the connection and freeing the table?
>>> Is there a better way to do this.
>>>
>>> Regards
>>> Col
>


Col Posted on 2008-04-02 22:48:39.0Z
From: "Col" <txtngo@hotmail.com>
Newsgroups: advantage.oledb
References: <47ec2f3b@solutions.advantagedatabase.com> <47f12559@solutions.advantagedatabase.com> <47f2d642@solutions.advantagedatabase.com> <47f3c482@solutions.advantagedatabase.com>
Subject: Re: Connection hanging on
Date: Thu, 3 Apr 2008 08:48:39 +1000
Lines: 1
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 12.0.1606
X-MimeOLE: Produced By Microsoft MimeOLE V12.0.1606
NNTP-Posting-Host: 60.242.255.160
Message-ID: <47f40bf3@solutions.advantagedatabase.com>
X-Trace: 2 Apr 2008 16:42:59 -0700, 60.242.255.160
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!60.242.255.160
Xref: solutions.advantagedatabase.com Advantage.OLEDB:1266
Article PK: 1133786

ARC is now not showing the connection but the application was still failing
with the 2001 error.
Resolved the issue by creating the cdx for the mt table.

Col

"Edgar Sherman" <no@email.com> wrote in message
news:47f3c482@solutions.advantagedatabase.com...
> Does ARC only show the one ARC connection, or does the other connection
> (from the OLEDB app) stay connected? Are the tables still showing as in
> use under "Open Files" Tab?
>
> If pooling is truly the issue, setting this to -2 *should* help, however I
> did a quick search on the KB and I see we had recommended in the past
> setting it to -4. You might give this a try. -4 will enable all services
> except pooling and auto-enlistment.
>
> Edgar
>
> Col wrote:
>> Thanks for your reply,
>>
>> After the table is closed and the connection closed, the Advantage Data
>> Architect shows that I am the only connected user.
>> I tried "OLE DB Services = -2;" but this made no change.
>>
>> Regards
>> Col
>>
>>
>> "Edgar Sherman" <no@email.com> wrote in message
>> news:47f12559@solutions.advantagedatabase.com...
>>> Closing the connection should close the table immediately. Do you still
>>> see your same connection active after the close? Could it be that some
>>> other user has this table open?
>>>
>>> Edgar
>>>
>>> Col wrote:
>>>> Hi All,
>>>> I have a vs2005 app (vb) that connects to a table with oledb and adds a
>>>> record
>>>>
>>>> strSRC="L:\ADSDATA"
>>>> strTBL="LIVEDTA"
>>>> connDST = New ADODB.Connection
>>>> rd = New ADODB.Recordset
>>>>
>>>> connDST.Open("Provider=Advantage.OLEDB.1;Data Source=" & strSRC
>>>> & ";ServerType=ADS_REMOTE_SERVER;TableType=ADS_CDX")
>>>> With rd
>>>> .ActiveConnection = connDST
>>>> .CursorLocation = 3
>>>> .CursorType = 1
>>>> .Open(strTBL, connDST, 1, 3, adCmdTable)
>>>> End With
>>>> rd.AddNew()
>>>> snip.......
>>>>
>>>> rd.Update()
>>>> rd.Close()
>>>> connDST.Close()
>>>>
>>>> It then calls an xharbour app to create an index for the table
>>>> x = Shell("Y:\CREATCDX " & strSCR & "\" & strTBL & " " & strTBL
>>>> & " CUSTNO", 1)
>>>> but this fails due to not having exclusive access to the table.
>>>>
>>>> How long is it between closing the connection and freeing the table?
>>>> Is there a better way to do this.
>>>>
>>>> Regards
>>>> Col
>>