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 vs DW Transaction

2 posts in DataWindow .NET Last posting was on 2004-08-13 14:13:36.0Z
Alex McC Posted on 2004-08-13 08:24:50.0Z
Sender: 58a0.411c6f73.1804289383@sybase.com
From: Alex McC
Newsgroups: sybase.public.datawindow.net
Subject: ADO Transaction vs DW Transaction
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <411c7ad2.594b.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 13 Aug 2004 01:24:50 -0700
X-Trace: forums-1-dub 1092385490 10.22.241.41 (13 Aug 2004 01:24:50 -0700)
X-Original-Trace: 13 Aug 2004 01:24:50 -0700, 10.22.241.41
Lines: 35
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:128
Article PK: 124562

Hi

I'm connecting to SQL Server via ADO.NET using trusted
connection. Using the code provided by Database profile
setup it works fine:

Dim theConnection As New System.Data.OleDb.OleDbConnection
theConnection.ConnectionString = "Data
Source=(local);Provider=SQLOLEDB;Initial
Catalog=dpodevt;Integrated Security=SSPI;"
theConnection.Open()
Dim myTrans As New
Sybase.DataWindow.AdoTransaction(theConnection, "")
myTrans.BindConnection()

However I can't get the DW Transaction to work. I added a
Trasaction object onto a different form and called it
myTrans (similar to the Programmer's tutorial). I then typed
the following code:

myTrans.Dbms = Sybase.DataWindow.DbmsType.OleDb
myTrans.DbParameter = "ConnectString='Data Source=
(local);Provider=SQLOLEDB;Initial Catalog=dpodevt;Integrated
Security=SSPI;'"
myTrans.Connect()


and got a connection failure. I based this on the example in
the Programmer's Guide tutorial. I also tried the
ConnectString expression directly into the DbParameter
property.

Any suggestions?

Alex


Jim O'Neil [Sybase] Posted on 2004-08-13 14:13:36.0Z
From: "Jim O'Neil [Sybase]" <joneil_at_sybase_dot_com>
Newsgroups: sybase.public.datawindow.net
Subject: Re: ADO Transaction vs DW Transaction
Message-ID: <2fiph0dur8b8ob7p39mmoel0726prb4a4m@4ax.com>
References: <411c7ad2.594b.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: joneilw2k.sybase.com
X-Original-NNTP-Posting-Host: joneilw2k.sybase.com
Date: 13 Aug 2004 07:13:36 -0700
X-Trace: forums-1-dub 1092406416 10.18.63.187 (13 Aug 2004 07:13:36 -0700)
X-Original-Trace: 13 Aug 2004 07:13:36 -0700, joneilw2k.sybase.com
Lines: 48
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:133
Article PK: 124568

Can you put a try/catch around the connection and get the full text of
the DbErrorException (or it might be TransactionException) here.

You might want to try the connection from within DataWindow Designer
and let it provide the code, just like you did for ADO.NET. I would
think the connection string should be identical though, although the
Data Source=(local) is not something I'm familar with (I don't use SQL
Server all that much).

On 13 Aug 2004 01:24:50 -0700, Alex McC wrote:

>Hi
>
>I'm connecting to SQL Server via ADO.NET using trusted
>connection. Using the code provided by Database profile
>setup it works fine:
>
>Dim theConnection As New System.Data.OleDb.OleDbConnection
>theConnection.ConnectionString = "Data
>Source=(local);Provider=SQLOLEDB;Initial
>Catalog=dpodevt;Integrated Security=SSPI;"
>theConnection.Open()
>Dim myTrans As New
>Sybase.DataWindow.AdoTransaction(theConnection, "")
>myTrans.BindConnection()
>
>However I can't get the DW Transaction to work. I added a
>Trasaction object onto a different form and called it
>myTrans (similar to the Programmer's tutorial). I then typed
>the following code:
>
>myTrans.Dbms = Sybase.DataWindow.DbmsType.OleDb
>myTrans.DbParameter = "ConnectString='Data Source=
>(local);Provider=SQLOLEDB;Initial Catalog=dpodevt;Integrated
>Security=SSPI;'"
>myTrans.Connect()
>
>
>and got a connection failure. I based this on the example in
>the Programmer's Guide tutorial. I also tried the
>ConnectString expression directly into the DbParameter
>property.
>
>Any suggestions?
>
>Alex