Package Description
$ dotnet add package CompuMaster.Data.NET library with common methods for simplified data access, data table arrangements and data IO
Install-Package CompuMaster.Data
respectively
Install-Package CompuMaster.Data.Controls
Also see: https://www.nuget.org/packages/CompuMaster.Data/
'VB.NET sample:
Dim MyTable As System.Data.DataTable = CompuMaster.Data.DataQuery.AnyIDataProvider.FillDataTable(
New System.Data.OleDb.OleDbConnection(ConnectionString),
"SELECT * FROM table", System.Data.CommandType.Text,
Nothing,
CompuMaster.Data.DataQuery.AnyIDataProvider.Automations.AutoOpenAndCloseAndDisposeConnection,
"MyTableName")
// C# sample:
System.Data.DataTable myTable = CompuMaster.Data.DataQuery.AnyIDataProvider.FillDataTable(
New System.Data.OleDb.OleDbConnection(ConnectionString),
"SELECT * FROM table", System.Data.CommandType.Text,
null,
CompuMaster.Data.DataQuery.AnyIDataProvider.Automations.AutoOpenAndCloseAndDisposeConnection,
"MyTableName");
Dim MyCmd As New System.Data.SqlClient.SqlCommand("SELECT * FROM table WHERE FN=@FirstName AND LN=@FamilyName", New System.Data.SqlClient.SqlConnection(ConnectionString))
MyCmd.Parameters.Add("@FirstName", SqlDbType.NVarChar).Value = "John"
MyCmd.Parameters.Add("@FamilyName", SqlDbType.NVarChar).Value = "O'Regan"
MyCmd.CommandType = System.Data.CommandType.Text
MyTable = CompuMaster.Data.DataQuery.AnyIDataProvider.FillDataTable(
MyCmd,
CompuMaster.Data.DataQuery.AnyIDataProvider.Automations.AutoOpenAndCloseAndDisposeConnection,
"MyTableName") SourceTable = CompuMaster.Data.Csv.ReadDataTableFromCsvFile("c:\temp\input.txt", True)
CompuMaster.Data.Csv.WriteDataTableToCsvFile("C:\temp\data.csv", SourceTable) Dim NewTable As DataTable = _
CompuMaster.Data.DataTables.SqlJoinTables(
LeftTable, New String() {"ID"},
RightTable, New String() {"PrimaryKeyID"},
CompuMaster.Data.DataTables.SqlJoinTypes.FullOuter) CompuMaster.Data.DataTables.ConvertToPlainTextTable(SourceTable)
CompuMaster.Data.DataTables.ConvertToPlainTextTableFixedColumnWidths(SourceTable)
CompuMaster.Data.DataTables.ConvertToHtmlTable(SourceTable)read directly from .XLS/.XLSX files using XlsReader (may require separate database drivers from Microsoft (Office) installed on your system)
SourceTable = CompuMaster.Data.XlsReader.ReadDataTableFromXlsFile(
"c:\temp\input.xlsx",
"sheet1")Still not convinced? Download your library now and for free and see the many stuff in the library you need all the days regardless if you're a C#, VB.NET or ... developer
This library has been developed and maintained by CompuMaster GmbH for years.
You may find this library useful for using DataGrids in Windows Forms application with row update support on the foreign data source
Install-Package CompuMaster.Data.Controls