繁体中文
设为首页
加入收藏
当前位置:.Net技术首页 >> XML应用 >> 看看国外的一个操作XML的东西。很不错。一、System.Data.XmlClient - XmlCommand

看看国外的一个操作XML的东西。很不错。一、System.Data.XmlClient - XmlCommand

2004-10-01 08:26:10  作者:  来源:互联网  浏览次数:16  文字大小:【】【】【
简介:using System; using System.ComponentModel; using System.Data; using System.Xml; namespace System.Data.XmlClient {   public class XmlCommand : Component, IDbCommand, ICloneable  &n...

using System;

using System.ComponentModel;

using System.Data;

using System.Xml;

namespace System.Data.XmlClient

{

public class XmlCommand : Component, IDbCommand, ICloneable

{

// Constructors

public XmlCommand()

{

}

public XmlCommand(string sCommand)

{

_commandText = sCommand;

_connection = null;

}

public XmlCommand(string sCommand, XmlConnection conn)

{

_commandText = sCommand;

_connection = conn;

}

////////////////////

// IDbCommand

////////////////////

// Public Properties

public string CommandText

{

get { return _commandText; }

set { _commandText = value; }

}

public int CommandTimeout

{

get { throw new InvalidOperationException("XmlClient Provider does not support this property"); }

set { throw new InvalidOperationException("XmlClient Provider does not support this property"); }

}

public CommandType CommandType

{

get { throw new InvalidOperationException("XmlClient Provider does not support this property"); }

set { throw new InvalidOperationException("XmlClient Provider does not support this property"); }

}

public IDbConnection Connection

{

get { return _connection; }

set { _connection = (XmlConnection) value; }

}

public IDataParameterCollection Parameters

{

get { throw new InvalidOperationException("XmlClient Provider does not support this property"); }

}

public IDbTransaction Transaction

{

get { throw new InvalidOperationException("XmlClient Provider does not support this property"); }

set { throw new InvalidOperationException("XmlClient Provider does not support this property"); }

}

public UpdateRowSource UpdatedRowSource

{

get { throw new InvalidOperationException("XmlClient Provider does not support this property"); }

set { throw new InvalidOperationException("XmlClient Provider does not support this property"); }

}

// Public Methods

public void Cancel()

{

throw new InvalidOperationException("XmlClient Provider does not support this function");

}

public IDbDataParameter CreateParameter()

{

throw new InvalidOperationException("XmlClient Provider does not support this function");

}

public int ExecuteNonQuery()

{

throw new InvalidOperationException("XmlClient Provider does not support this function");

}

public IDataReader ExecuteReader()

{

return null;

}

public IDataReader ExecuteReader(CommandBehavior behavior)

{

return null;

}

public object ExecuteScalar()

{

throw new InvalidOperationException("XmlClient Provider does not support this function");

}

public void Prepare()

{

//throw new InvalidOperationException("XmlClient Provider does not support this function");

}

////////////////////

// ICloneable

////////////////////

public object Clone()

{

return null;

}

////////////////////

// Internal Data Members

////////////////////

internal string _commandText = "";

internal XmlConnection _connection = null;

}

}

责任编辑:admin
相关文章