* Mono.Data.SybaseClient/SybaseCommand.cs: Use Tds instead of ITds now.
* Mono.Data.SybaseClient/SybaseConnection.cs: Likewise.
2008-06-09 Ankit Jain <jankit@novell.com>
* ITds.cs: Removed.
* Mono.Data.Tds.dll.sources: Update.
2008-06-09 Ankit Jain <jankit@novell.com>
* TdsCommand.cs, TdsConnection.cs: Use Tds instead of ITds now.
2008-06-09 Ankit Jain <jankit@novell.com>
* SqlCommand.cs: Use Tds instead of ITds now.
* SqlConnection.cs: Likewise.
svn path=/trunk/mcs/; revision=105402
+2008-06-09 Ankit Jain <jankit@novell.com>
+
+ * Mono.Data.SybaseClient/SybaseCommand.cs: Use Tds instead of ITds now.
+ * Mono.Data.SybaseClient/SybaseConnection.cs: Likewise.
+
2006-12-20 Nagappan A <anagappan@novell.com>
* Mono.Data.SybaseClient/SybaseRowUpdatedEventArgs.cs
using Mono.Data.Tds;
using Mono.Data.Tds.Protocol;
+using MDTP = Mono.Data.Tds.Protocol;
+
using System;
using System.Collections;
using System.Collections.Specialized;
get { return parameters; }
}
- internal ITds Tds {
+ internal MDTP.Tds Tds {
get { return Connection.Tds; }
}
//
using Mono.Data.Tds.Protocol;
+using MDTP = Mono.Data.Tds.Protocol;
using System;
using System.Collections;
using System.Collections.Specialized;
SybaseDataReader dataReader = null;
// The TDS object
- ITds tds;
+ MDTP.Tds tds;
#endregion // Fields
get { return state; }
}
- internal ITds Tds {
+ internal MDTP.Tds Tds {
get { return tds; }
}
+2008-06-09 Ankit Jain <jankit@novell.com>
+
+ * ITds.cs: Removed.
+ * Mono.Data.Tds.dll.sources: Update.
+
2007-07-22 Nagappan A <anagappan@novell.com>
* Mono.Data.Tds.dll.sources: Added
+2008-06-09 Ankit Jain <jankit@novell.com>
+
+ Tds class doesn't need to inherit Component or implement ITds, fix.
+ * Tds.cs: Update
+ * Tds42.cs, Tds50.cs, Tds70.cs, Tds80.cs:
+ Make Tds-derived classes sealed.
+ * TdsConnectionPool.cs: Update.
+
2008-05-17 Gert Driesen <drieseng@users.sourceforge.net>
* Tds.cs: Do not return 0 for decimal/numeric columns with value NULL.
+++ /dev/null
-//
-// Mono.Data.Tds.Protocol.ITds.cs
-//
-// Author:
-// Tim Coleman (tim@timcoleman.com)
-//
-// Copyright (C) 2002 Tim Coleman
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using Mono.Data.Tds;
-using System;
-using System.Collections;
-
-namespace Mono.Data.Tds.Protocol {
- public interface ITds
- {
- #region Properties
-
- string Database {
- get;
- }
-
- bool DoneProc {
- get;
- }
-
- bool IsConnected {
- get;
- }
-
- bool Pooling {
- get;
- set;
- }
-
- string ServerVersion {
- get;
- }
-
- TdsDataColumnCollection Columns {
- get;
- }
-
- TdsDataRow ColumnValues {
- get;
- }
-
- ArrayList OutputParameters {
- get;
- set;
- }
-
- int RecordsAffected {
- get;
- set;
- }
-
- bool SequentialAccess {
- get;
- set;
- }
-
- #endregion // Properties
-
- #region Methods
-
- void Cancel ();
- bool Connect (TdsConnectionParameters connectionParameters);
- void Disconnect ();
- bool Reset ();
-
- void Execute (string commandText);
- void ExecProc (string procedure);
-
- void Execute (string commandText, TdsMetaParameterCollection parameters, int timeout, bool wantResults);
- void ExecPrepared (string statementId, TdsMetaParameterCollection parameters, int timeout, bool wantResults);
- void ExecProc (string procedure, TdsMetaParameterCollection parameters, int timeout, bool wantResults);
-
- bool NextResult ();
- bool NextRow ();
-
- string Prepare (string commandText, TdsMetaParameterCollection parameters);
-
- void SkipToEnd ();
-
- void Unprepare (string statementId);
-
- #endregion
-
- #region Events
-
- event TdsInternalErrorMessageEventHandler TdsErrorMessage;
- event TdsInternalInfoMessageEventHandler TdsInfoMessage;
-
- #endregion // Events
-
-#if NET_2_0
- #region Asynchronous Methods
- IAsyncResult BeginExecuteNonQuery (string sql,
- TdsMetaParameterCollection parameters,
- AsyncCallback callback,
- object state);
- void EndExecuteNonQuery (IAsyncResult ar);
- IAsyncResult BeginExecuteQuery (string sql,
- TdsMetaParameterCollection parameters,
- AsyncCallback callback,
- object state);
- void EndExecuteQuery (IAsyncResult ar);
-
- IAsyncResult BeginExecuteProcedure (string prolog,
- string epilog,
- string cmdText,
- bool IsNonQuery,
- TdsMetaParameterCollection parameters,
- AsyncCallback callback,
- object state);
- void EndExecuteProcedure (IAsyncResult ar);
-
- void WaitFor (IAsyncResult ar);
- void CheckAndThrowException (IAsyncResult ar);
-
- #endregion //Asynchronous Methods
-#endif // NET_2_0
-
- }
-}
namespace Mono.Data.Tds.Protocol
{
- public abstract class Tds : Component, ITds
+ public abstract class Tds
{
#region Fields
}
element = GetDecimalValue (precision, scale);
-
+
// workaround for fact that TDS 7.0 returns
// bigint as decimal (19,0), and client code
// expects it to be returned as a long
- if (tdsVersion == TdsVersion.tds70 && scale == 0 && precision == 19) {
+ if (scale == 0 && precision <= 19) {
if (!(element is System.DBNull))
element = Convert.ToInt64 (element);
}
using System;
namespace Mono.Data.Tds.Protocol {
- public class Tds42 : Tds
+ public sealed class Tds42 : Tds
{
#region Fields
namespace Mono.Data.Tds.Protocol {
[MonoTODO ("FIXME: Can packetsize be anything other than 512?")]
- public class Tds50 : Tds
+ public sealed class Tds50 : Tds
{
#region Fields
using System.Text;
namespace Mono.Data.Tds.Protocol {
- public class Tds70 : Tds
+ public sealed class Tds70 : Tds
{
#region Fields
using System;
namespace Mono.Data.Tds.Protocol {
- public class Tds80 : Tds
+ public sealed class Tds80 : Tds
{
#region Fields
}
}
- public virtual ITds CreateConnection (TdsConnectionInfo info)
+ public virtual Tds CreateConnection (TdsConnectionInfo info)
{
switch (version)
{
#region Methods
- public ITds GetConnection ()
+ public Tds GetConnection ()
{
- ITds connection = null;
+ Tds connection = null;
lock (list)
{
if (!initialized)
if (list.Count > 0)
{
// There are available connections
- connection = (ITds) list [list.Count - 1];
+ connection = (Tds) list [list.Count - 1];
list.RemoveAt (list.Count - 1);
if (!connection.Reset ()) {
try {
return connection;
}
- public void ReleaseConnection (ITds tds)
+ public void ReleaseConnection (Tds tds)
{
lock (list)
{
}
#if NET_2_0
- public void ReleaseConnection (ref ITds tds)
+ public void ReleaseConnection (ref Tds tds)
{
lock (list)
{
{
lock (list)
{
- ITds connection = null;
+ Tds connection = null;
while (list.Count > 0) {
// There are available connections
- connection = (ITds) list [list.Count - 1];
+ connection = (Tds) list [list.Count - 1];
list.RemoveAt (list.Count - 1);
if (!connection.Reset ()) {
try {
}
}
- public void ResetConnectionPool (ITds connection)
+ public void ResetConnectionPool (Tds connection)
{
lock (list)
{
}
#endif
- ITds CreateConnection ()
+ Tds CreateConnection ()
{
activeConnections++;
return manager.CreateConnection (info);
Mono.Data.Tds/TdsMetaParameter.cs
Mono.Data.Tds/TdsMetaParameterCollection.cs
Mono.Data.Tds/TdsParameterDirection.cs
-Mono.Data.Tds.Protocol/ITds.cs
Mono.Data.Tds.Protocol/Tds.cs
Mono.Data.Tds.Protocol/Tds42.cs
Mono.Data.Tds.Protocol/Tds50.cs
+2008-06-09 Ankit Jain <jankit@novell.com>
+
+ * TdsCommand.cs, TdsConnection.cs: Use Tds instead of ITds now.
+
2004-04-05 Lluis Sanchez Gual <lluis@ximian.com>
* TdsConnection.cs: Use the connection pool implemented in Mono.Data.Tds.
using Mono.Data.Tds;
using Mono.Data.Tds.Protocol;
+using MDTP = Mono.Data.Tds.Protocol;
using System;
using System.Collections;
using System.Collections.Specialized;
get { return parameters; }
}
- internal ITds Tds {
+ internal MDTP.Tds Tds {
get { return Connection.Tds; }
}
//
using Mono.Data.Tds.Protocol;
+using MDTP = Mono.Data.Tds.Protocol;
using System;
using System.Collections;
using System.Collections.Specialized;
TdsDataReader dataReader = null;
// The TDS object
- ITds tds;
+ MDTP.Tds tds;
#endregion // Fields
get { return state; }
}
- internal ITds Tds {
+ internal MDTP.Tds Tds {
get { return tds; }
}
+2008-06-09 Ankit Jain <jankit@novell.com>
+
+ * SqlCommand.cs: Use Tds instead of ITds now.
+ * SqlConnection.cs: Likewise.
+
2008-05-27 Gert Driesen <drieseng@users.sourceforge.net>
* SqlConnection.cs: Added support for '.' as alias for localhost.
get { return parameters; }
}
- internal ITds Tds {
+ internal Tds Tds {
get { return Connection.Tds; }
}
XmlReader xmlReader;
// The TDS object
- ITds tds;
+ Tds tds;
#endregion // Fields
get { return state; }
}
- internal ITds Tds {
+ internal Tds Tds {
get { return tds; }
}
foreach (TdsConnectionPool pool in pools.Values) {
if (pool != null) {
pool.ResetConnectionPool ();
- ITds tds = pool.GetConnection ();
+ Tds tds = pool.GetConnection ();
tds.Pooling = false;
}
}