C# Класс Revit.SDK.Samples.RoomSchedule.XlsDBConnector

An integrated class to connect .xls data source, retrieve / update data
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Dispose ( ) : void

Close the OleDb connection

ExecuteCommnand ( String strCmd ) : int

Execute SQL command, such as: update and insert

GenDataTable ( String tableName ) : DataTable

Generate a DataTable data from xls data source, by a specified table name

RetrieveAllTables ( ) : List

Get all available table names from .xls data source

XlsDBConnector ( String strXlsFile ) : System

Class constructor, to retrieve data from .xls data source

Приватные методы

Метод Описание
CheckSameColName ( String baseName, String compName ) : bool

Check if two columns names are the same

ValidateFile ( String strFile ) : bool

This method will validate and update attributes the specified file. The file should exist and it should have writable attribute. If it's readonly, this method will try to set the attribute to writable.

Описание методов

Dispose() публичный Метод

Close the OleDb connection
public Dispose ( ) : void
Результат void

ExecuteCommnand() публичный Метод

Execute SQL command, such as: update and insert
public ExecuteCommnand ( String strCmd ) : int
strCmd String command to be executed
Результат int

GenDataTable() публичный Метод

Generate a DataTable data from xls data source, by a specified table name
public GenDataTable ( String tableName ) : DataTable
tableName String Table name to be retrieved
Результат System.Data.DataTable

RetrieveAllTables() публичный Метод

Get all available table names from .xls data source
public RetrieveAllTables ( ) : List
Результат List

XlsDBConnector() публичный Метод

Class constructor, to retrieve data from .xls data source
public XlsDBConnector ( String strXlsFile ) : System
strXlsFile String The .xls file to be connected. /// This file should exist and it can be writable.
Результат System