SDO_dotNET 1.0.2

The SDO_dotNET Class Library is a high level wrapper around the ODBC, OLEDB, SQLServer and SQLite.

The SQL Data Objects (PDO) extension defines a lightweight, consistent interface for accessing databases in .NET.
Each database driver that implements the PDO interface can expose database-specific features as regular extension functions.
Note that you cannot perform any database functions using the PDO extension by itself; you must use a database-specific PDO driver to access a database server.

PDO provides a data-access abstraction layer, which means that, regardless of which database you're using, you use the same functions to issue queries and fetch data.
PDO does not provide a database abstraction; it doesn't rewrite SQL or emulate missing features. You should use a full-blown abstraction layer if you need that facility.

The library is currently compiled at .Net 4.0 so it should work with any application running .Net 4.0 and above.

Install-Package SDO_dotNET -Version 1.0.2
dotnet add package SDO_dotNET --version 1.0.2
<PackageReference Include="SDO_dotNET" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SDO_dotNET --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

The SDO_dotNET Class Library is a high level wrapper around the ODBC, OLEDB, SQLServer and SQLite.

Example:
using SqlDB;

/******************************************************************
Sql Server
*******************************************************************/

string server = @"INSTANCE\SQLEXPRESS";
string database = "DEMODB";
string username = "sa";
string password = "";

string connectionString = @"Data Source=" + server + ";Initial Catalog=" + database + "; Trusted_Connection=True;User ID=" + username + ";Password=" + password + "";
SDO db_conn = new SDO(connectionString);

Console.WriteLine("isConnected: " + db_conn.isConnected());
if (db_conn == null || !db_conn.isConnected())
{
Console.WriteLine("Connessione non valida.");
return;
}

string sql = "SELECT ID, Message FROM Logs ORDER BY IDLic;";
DataTable dtLogs = db_conn.SelectTable(sql);

if (dtLogs == null || dtLogs.Rows.Count == 0)
return;

// Loop with the foreach keyword.
foreach (DataRow dr in dtLogs.Rows)
{
Console.WriteLine("Message: " + dr["Message"].ToString().Trim());
}

/******************************************************************
SQLite
*******************************************************************/

string database = @"C:\Users\Utente\mydb.sqlite";

string connectionString = @"Data Source=" + database + "; Version=3; New=True; Compress=True;"; // local
SDO db_conn = new SDO(connectionString);

Console.WriteLine("isConnected: " + db_conn.isConnected());
if (db_conn == null || !db_conn.isConnected())
{
Console.WriteLine("Connessione non valida.");
return;
}

string sql = "SELECT firstname, surname FROM users ORDER BY firstname;";
DataTable dtLogs = db_conn.SelectTable(sql);

if (dtLogs == null || dtLogs.Rows.Count == 0)
return;

// Loop with the foreach keyword.
foreach (DataRow dr in dtLogs.Rows)
{
Console.WriteLine("Name: " + dr["firstname"].ToString().Trim() + " " + dr["surname"].ToString().Trim());
}

The SDO_dotNET Class Library is a high level wrapper around the ODBC, OLEDB, SQLServer and SQLite.

Example:
using SqlDB;

/******************************************************************
Sql Server
*******************************************************************/

string server = @"INSTANCE\SQLEXPRESS";
string database = "DEMODB";
string username = "sa";
string password = "";

string connectionString = @"Data Source=" + server + ";Initial Catalog=" + database + "; Trusted_Connection=True;User ID=" + username + ";Password=" + password + "";
SDO db_conn = new SDO(connectionString);

Console.WriteLine("isConnected: " + db_conn.isConnected());
if (db_conn == null || !db_conn.isConnected())
{
Console.WriteLine("Connessione non valida.");
return;
}

string sql = "SELECT ID, Message FROM Logs ORDER BY IDLic;";
DataTable dtLogs = db_conn.SelectTable(sql);

if (dtLogs == null || dtLogs.Rows.Count == 0)
return;

// Loop with the foreach keyword.
foreach (DataRow dr in dtLogs.Rows)
{
Console.WriteLine("Message: " + dr["Message"].ToString().Trim());
}

/******************************************************************
SQLite
*******************************************************************/

string database = @"C:\Users\Utente\mydb.sqlite";

string connectionString = @"Data Source=" + database + "; Version=3; New=True; Compress=True;"; // local
SDO db_conn = new SDO(connectionString);

Console.WriteLine("isConnected: " + db_conn.isConnected());
if (db_conn == null || !db_conn.isConnected())
{
Console.WriteLine("Connessione non valida.");
return;
}

string sql = "SELECT firstname, surname FROM users ORDER BY firstname;";
DataTable dtLogs = db_conn.SelectTable(sql);

if (dtLogs == null || dtLogs.Rows.Count == 0)
return;

// Loop with the foreach keyword.
foreach (DataRow dr in dtLogs.Rows)
{
Console.WriteLine("Name: " + dr["firstname"].ToString().Trim() + " " + dr["surname"].ToString().Trim());
}

Release Notes

SQL Data Object .NetFramework.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.2 135 12/13/2018
1.0.1 116 12/9/2018