Class XmlDataConnection
Represents a connection to xml file-based database.
Inheritance
System.Object
XmlDataConnection
Assembly: FastReport.Base.dll
Syntax
public class XmlDataConnection : DataConnectionBase, IDisposable, IFRSerializable, IParent
Examples
This example shows how to add a new connection to the report.
Report report1;
XmlDataConnection conn = new XmlDataConnection();
conn.XmlFile = @"c:\data.xml";
report1.Dictionary.Connections.Add(conn);
conn.CreateAllTables();
Constructors
XmlDataConnection()
Declaration
public XmlDataConnection()
Properties
Codepage
Gets or sets the codepage of the .xml file.
Declaration
public int Codepage { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
XmlFile
Gets or sets the path to .xml file.
Declaration
public string XmlFile { get; set; }
Property Value
Type |
Description |
System.String |
|
XsdFile
Gets or sets the path to .xsd file.
Declaration
public string XsdFile { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
CreateDataSet()
Declaration
protected override DataSet CreateDataSet()
Returns
Overrides
CreateDataSetAsync(CancellationToken)
Declaration
protected override async Task<DataSet> CreateDataSetAsync(CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<DataSet> |
|
Overrides
CreateTable(TableDataSource)
Declaration
public override void CreateTable(TableDataSource source)
Parameters
Overrides
CreateTableAsync(TableDataSource, CancellationToken)
Declaration
public override Task CreateTableAsync(TableDataSource source, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type |
Name |
Description |
TableDataSource |
source |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
DeleteTable(TableDataSource)
Declaration
public override void DeleteTable(TableDataSource source)
Parameters
Overrides
FillTableData(DataTable, String, CommandParameterCollection)
Declaration
public override void FillTableData(DataTable table, string selectCommand, CommandParameterCollection parameters)
Parameters
Overrides
FillTableDataAsync(DataTable, String, CommandParameterCollection, CancellationToken)
Declaration
public override Task FillTableDataAsync(DataTable table, string selectCommand, CommandParameterCollection parameters, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type |
Name |
Description |
DataTable |
table |
|
System.String |
selectCommand |
|
CommandParameterCollection |
parameters |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
FillTableSchema(DataTable, String, CommandParameterCollection)
Declaration
public override void FillTableSchema(DataTable table, string selectCommand, CommandParameterCollection parameters)
Parameters
Overrides
FillTableSchemaAsync(DataTable, String, CommandParameterCollection, CancellationToken)
Declaration
public override Task FillTableSchemaAsync(DataTable table, string selectCommand, CommandParameterCollection parameters, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type |
Name |
Description |
DataTable |
table |
|
System.String |
selectCommand |
|
CommandParameterCollection |
parameters |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
GetTableNames()
Declaration
public override string[] GetTableNames()
Returns
Type |
Description |
System.String[] |
|
Overrides
GetTableNamesAsync(CancellationToken)
Declaration
public override Task<string[]> GetTableNamesAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type |
Name |
Description |
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.String[]> |
|
Overrides
QuoteIdentifier(String, DbConnection)
Declaration
public override string QuoteIdentifier(string value, DbConnection connection)
Parameters
Type |
Name |
Description |
System.String |
value |
|
DbConnection |
connection |
|
Returns
Type |
Description |
System.String |
|
Overrides
SetConnectionString(String)
Declaration
protected override void SetConnectionString(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
|
Overrides
Implements