Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

AseTransacton.Connection is not upwardly compatable

1 view
Skip to first unread message

Jeffrey P. Silverstone

unread,
Jun 13, 2007, 4:34:52 PM6/13/07
to
Perhaps this cannot be avoided, but if so, then the documentation should
mention that any occurrences of
AseTransacton.Connection need to switch to
((AseConnection)AseTransacton.Connection ) .
There is another alternative change, but this syntax should work (I have not
tested it at runtime yet, so I am not sure) in both the 1.1 driver as well
as the 2.0 driver.

-- Jeffrey


Tim Welch

unread,
Jun 14, 2007, 12:24:30 PM6/14/07
to
I'm not sure I understand what you are trying to do. Could you post a bit of
code where this is used?

Thanks,
Tim

"Jeffrey P. Silverstone" <jps-...@margreta.com> wrote in message
news:467054ec@forums-1-dub...

Jeffrey P. Silverstone

unread,
Jun 15, 2007, 7:37:20 AM6/15/07
to
Firstly, I do not have a problem that I have not already worked around. I am pointing out a lack of code incompatibility in existing, working, code, so all I am trying to do is to get the same code to compile and run under the new drivers.
 
This is an example of code which compiles under the old driver but not under the new one:
 
   public class MyTransaction : DbTransaction {
      internal MyTransaction (Sybase.Data.AseClient.AseTransaction asetransaction, DbConnection Dbc) {
// code irrelevant to example

      }
      internal MyTransaction(Sybase.Data.AseClient.AseTransaction asetransaction)
         : this(asetransaction, new MyConnection(asetransaction.Connection)) { }
  }
  public class MyConnection : DbConnection {
      internal AseConnection(Sybase.Data.AseClient.AseConnection aseconnection) {
// code irrelevant to example
      }
  }
 
 
Under the old drivers, asetransaction.Connection was an AseConnection, so it could be passed to the constructor of MyConnection.
Under the new drivers, asetransaction.Connection is defined as a DbConnection, so it cannot be passed to the constructor of without an explicit conversion.
 
 
"Tim Welch" <twe...@sybase.com> wrote in message news:46716bbe$1@forums-1-dub...
0 new messages