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.

ADO Transaction Problem

4 posts in DataWindow .NET Last posting was on 2004-10-21 17:22:26.0Z
Cristos Posted on 2004-10-21 14:27:32.0Z
Sender: 454.4177b2fb.1804289383@sybase.com
From: Cristos
Newsgroups: sybase.public.datawindow.net
Subject: ADO Transaction Problem
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4177c754.5e0.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 21 Oct 2004 07:27:32 -0700
X-Trace: forums-1-dub 1098368852 10.22.241.41 (21 Oct 2004 07:27:32 -0700)
X-Original-Trace: 21 Oct 2004 07:27:32 -0700, 10.22.241.41
Lines: 74
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:581
Article PK: 125008

I had an earlier post that talked about the problem with the
ADO Transaction that I did not receive a reply on. Please
let me know if there is more information that is required
for this.

Thanks,
Cristos

This is my earlier post:

When I am calling a .NET COM object with a DataWindow from
PowerBuilder application I get the following exception
thrown.

"BindConnection did not complete successfully, the error
message is : Failed to create a instance of type DbRoutine."

The .NET Code is as follows:

###BEGIN FUNCTION

Dim glOleDBConn As New System.Data.OleDb.OleDbConnection
Dim glAdoTrans As Sybase.DataWindow.AdoTransaction
Try
glOleDBConn.ConnectionString =
"Server=localhost;Provider=SQLOLEDB;Initial
Catalog=Northwind" & _
";User ID=sa;Password=sa;"

glOleDBConn.Open()
glAdoTrans = New
Sybase.DataWindow.AdoTransaction(glOleDBConn)
glAdoTrans.BindConnection()

dwTEST.GetChild("id").SetTransaction(glAdoTrans)
dwTEST.GetChild("id").Retrieve()
Catch ex As Exception
MessageBox.Show(ex.ToString)
Finally
glOleDBConn.Close()
glOleDBConn.Dispose()
glOleDBConn = Nothing

glAdoTrans = Nothing
End Try
####END FUNCTION

If I call to it a second time I get a message saying that
the bind already exists and that another Key Definition is
being assigned. I had one of our PB developers write some
code to call this .NET COM object which follows:

####BEGIN PB CODE

oleobject testole
long li_rc
string ls_com


testole = create oleobject
ls_com = "TMWInterface.Logic"
li_rc = testole.ConnectToNewObject(ls_com)
IF li_rc < 0 THEN
MessageBox("Connecting to COM Object Failed", ls_com ,
information!, ok!, 1)
destroy testole
return
end if
testole.testbind

testole.DisconnectObject
destroy testole

####END PB CODE


Jim O'Neil [Sybase] Posted on 2004-10-21 15:13:26.0Z
From: "Jim O'Neil [Sybase]" <joneil_at_sybase_dot_com>
Newsgroups: sybase.public.datawindow.net
Subject: Re: ADO Transaction Problem
Message-ID: <ddkfn0do2im0qr3dfufleei5tkltjkiemf@4ax.com>
References: <4177c754.5e0.1681692777@sybase.com>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: surfec007.sybase.com
X-Original-NNTP-Posting-Host: surfec007.sybase.com
Date: 21 Oct 2004 08:13:26 -0700
X-Trace: forums-1-dub 1098371606 199.93.176.7 (21 Oct 2004 08:13:26 -0700)
X-Original-Trace: 21 Oct 2004 08:13:26 -0700, surfec007.sybase.com
Lines: 83
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:583
Article PK: 125010

This will probably require a little more research than most of us can
provide on a quick scan of the newsgroups. I would suggest opening a
support case so that we can take a further look at it. I, myself, had
not tried using the DataStore within a .NET assembly, which I presume
you are exposing as a COM component, at this point.

On 21 Oct 2004 07:27:32 -0700, Cristos wrote:

>I had an earlier post that talked about the problem with the
>ADO Transaction that I did not receive a reply on. Please
>let me know if there is more information that is required
>for this.
>
>Thanks,
>Cristos
>
>This is my earlier post:
>
>When I am calling a .NET COM object with a DataWindow from
>PowerBuilder application I get the following exception
>thrown.
>
>"BindConnection did not complete successfully, the error
>message is : Failed to create a instance of type DbRoutine."
>
>The .NET Code is as follows:
>
>###BEGIN FUNCTION
>
> Dim glOleDBConn As New System.Data.OleDb.OleDbConnection
> Dim glAdoTrans As Sybase.DataWindow.AdoTransaction
> Try
> glOleDBConn.ConnectionString =
>"Server=localhost;Provider=SQLOLEDB;Initial
>Catalog=Northwind" & _
>";User ID=sa;Password=sa;"
>
> glOleDBConn.Open()
> glAdoTrans = New
>Sybase.DataWindow.AdoTransaction(glOleDBConn)
> glAdoTrans.BindConnection()
>
> dwTEST.GetChild("id").SetTransaction(glAdoTrans)
> dwTEST.GetChild("id").Retrieve()
> Catch ex As Exception
> MessageBox.Show(ex.ToString)
> Finally
> glOleDBConn.Close()
> glOleDBConn.Dispose()
> glOleDBConn = Nothing
>
> glAdoTrans = Nothing
> End Try
>####END FUNCTION
>
>If I call to it a second time I get a message saying that
>the bind already exists and that another Key Definition is
>being assigned. I had one of our PB developers write some
>code to call this .NET COM object which follows:
>
>####BEGIN PB CODE
>
>oleobject testole
>long li_rc
>string ls_com
>
>
>testole = create oleobject
>ls_com = "TMWInterface.Logic"
>li_rc = testole.ConnectToNewObject(ls_com)
>IF li_rc < 0 THEN
>MessageBox("Connecting to COM Object Failed", ls_com ,
>information!, ok!, 1)
>destroy testole
>return
>end if
>testole.testbind
>
>testole.DisconnectObject
>destroy testole
>
>####END PB CODE


Cristos Posted on 2004-10-21 16:52:49.0Z
Sender: 990.4177e71d.1804289383@sybase.com
From: cristos
Newsgroups: sybase.public.datawindow.net
Subject: Re: ADO Transaction Problem
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4177e961.9b5.1681692777@sybase.com>
References: <ddkfn0do2im0qr3dfufleei5tkltjkiemf@4ax.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 21 Oct 2004 09:52:49 -0700
X-Trace: forums-1-dub 1098377569 10.22.241.41 (21 Oct 2004 09:52:49 -0700)
X-Original-Trace: 21 Oct 2004 09:52:49 -0700, 10.22.241.41
Lines: 87
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:590
Article PK: 125017

Where can I post this as a support issue?

> This will probably require a little more research than
> most of us can provide on a quick scan of the newsgroups.
> I would suggest opening a support case so that we can take
> a further look at it. I, myself, had not tried using the
> DataStore within a .NET assembly, which I presume you are
> exposing as a COM component, at this point.
>
> On 21 Oct 2004 07:27:32 -0700, Cristos wrote:
>
> >I had an earlier post that talked about the problem with
> the >ADO Transaction that I did not receive a reply on.
> Please >let me know if there is more information that is
> required >for this.
> >
> >Thanks,
> >Cristos
> >
> >This is my earlier post:
> >
> >When I am calling a .NET COM object with a DataWindow
> from >PowerBuilder application I get the following
> exception >thrown.
> >
> >"BindConnection did not complete successfully, the error
> >message is : Failed to create a instance of type
> DbRoutine." >
> >The .NET Code is as follows:
> >
> >###BEGIN FUNCTION
> >
> > Dim glOleDBConn As New System.Data.OleDb.OleDbConnection
> > Dim glAdoTrans As Sybase.DataWindow.AdoTransaction
> > Try
> > glOleDBConn.ConnectionString =
> >"Server=localhost;Provider=SQLOLEDB;Initial
> >Catalog=Northwind" & _
> >";User ID=sa;Password=sa;"
> >
> > glOleDBConn.Open()
> > glAdoTrans = New
> >Sybase.DataWindow.AdoTransaction(glOleDBConn)
> > glAdoTrans.BindConnection()
> >
> >
> >
> dwTEST.GetChild("id").SetTransaction(glAdoTrans)
> > dwTEST.GetChild("id").Retrieve() Catch ex As
> > Exception MessageBox.Show(ex.ToString)
> > Finally
> > glOleDBConn.Close()
> > glOleDBConn.Dispose()
> > glOleDBConn = Nothing
> >
> > glAdoTrans = Nothing
> > End Try
> >####END FUNCTION
> >
> >If I call to it a second time I get a message saying that
> >the bind already exists and that another Key Definition
> is >being assigned. I had one of our PB developers write
> some >code to call this .NET COM object which follows:
> >
> >####BEGIN PB CODE
> >
> >oleobject testole
> >long li_rc
> >string ls_com
> >
> >
> >testole = create oleobject
> >ls_com = "TMWInterface.Logic"
> >li_rc = testole.ConnectToNewObject(ls_com)
> >IF li_rc < 0 THEN
> >MessageBox("Connecting to COM Object Failed", ls_com ,
> >information!, ok!, 1)
> >destroy testole
> >return
> >end if
> >testole.testbind
> >
> >testole.DisconnectObject
> >destroy testole
> >
> >####END PB CODE
>


dfish Posted on 2004-10-21 17:22:26.0Z
From: dfish@_no_spam_sybase.com (Dave Fish [Team Sybase])
Newsgroups: sybase.public.datawindow.net
Subject: Re: ADO Transaction Problem
Organization: Sybase Professional Services
Reply-To: nospam_dfish@sybase.com_nospam
Message-ID: <4177f026.528805051@forums.sybase.com>
References: <ddkfn0do2im0qr3dfufleei5tkltjkiemf@4ax.com> <4177e961.9b5.1681692777@sybase.com>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: vpn-dub-064.sybase.com
X-Original-NNTP-Posting-Host: vpn-dub-064.sybase.com
Date: 21 Oct 2004 10:22:26 -0700
X-Trace: forums-1-dub 1098379346 10.22.120.64 (21 Oct 2004 10:22:26 -0700)
X-Original-Trace: 21 Oct 2004 10:22:26 -0700, vpn-dub-064.sybase.com
Lines: 104
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:591
Article PK: 125018

http://case-express.sybase.com/cx/cx.stm

You will need a MySybase account which you can register for at the
site (its free).

Regards,
Dave Fish
Sybase

TeamSybase blogs: http://www.teamsybase.net/blogs

DataWindow.NET code examples available on CodeXchange:
http://datawindownet.codexchange.sybase.com

On 21 Oct 2004 09:52:49 -0700, cristos wrote:

>Where can I post this as a support issue?
>
>> This will probably require a little more research than
>> most of us can provide on a quick scan of the newsgroups.
>> I would suggest opening a support case so that we can take
>> a further look at it. I, myself, had not tried using the
>> DataStore within a .NET assembly, which I presume you are
>> exposing as a COM component, at this point.
>>
>> On 21 Oct 2004 07:27:32 -0700, Cristos wrote:
>>
>> >I had an earlier post that talked about the problem with
>> the >ADO Transaction that I did not receive a reply on.
>> Please >let me know if there is more information that is
>> required >for this.
>> >
>> >Thanks,
>> >Cristos
>> >
>> >This is my earlier post:
>> >
>> >When I am calling a .NET COM object with a DataWindow
>> from >PowerBuilder application I get the following
>> exception >thrown.
>> >
>> >"BindConnection did not complete successfully, the error
>> >message is : Failed to create a instance of type
>> DbRoutine." >
>> >The .NET Code is as follows:
>> >
>> >###BEGIN FUNCTION
>> >
>> > Dim glOleDBConn As New System.Data.OleDb.OleDbConnection
>> > Dim glAdoTrans As Sybase.DataWindow.AdoTransaction
>> > Try
>> > glOleDBConn.ConnectionString =
>> >"Server=localhost;Provider=SQLOLEDB;Initial
>> >Catalog=Northwind" & _
>> >";User ID=sa;Password=sa;"
>> >
>> > glOleDBConn.Open()
>> > glAdoTrans = New
>> >Sybase.DataWindow.AdoTransaction(glOleDBConn)
>> > glAdoTrans.BindConnection()
>> >
>> >
>> >
>> dwTEST.GetChild("id").SetTransaction(glAdoTrans)
>> > dwTEST.GetChild("id").Retrieve() Catch ex As
>> > Exception MessageBox.Show(ex.ToString)
>> > Finally
>> > glOleDBConn.Close()
>> > glOleDBConn.Dispose()
>> > glOleDBConn = Nothing
>> >
>> > glAdoTrans = Nothing
>> > End Try
>> >####END FUNCTION
>> >
>> >If I call to it a second time I get a message saying that
>> >the bind already exists and that another Key Definition
>> is >being assigned. I had one of our PB developers write
>> some >code to call this .NET COM object which follows:
>> >
>> >####BEGIN PB CODE
>> >
>> >oleobject testole
>> >long li_rc
>> >string ls_com
>> >
>> >
>> >testole = create oleobject
>> >ls_com = "TMWInterface.Logic"
>> >li_rc = testole.ConnectToNewObject(ls_com)
>> >IF li_rc < 0 THEN
>> >MessageBox("Connecting to COM Object Failed", ls_com ,
>> >information!, ok!, 1)
>> >destroy testole
>> >return
>> >end if
>> >testole.testbind
>> >
>> >testole.DisconnectObject
>> >destroy testole
>> >
>> >####END PB CODE
>>