SDO_dotNET 1.2.0

dotnet add package SDO_dotNET --version 1.2.0
NuGet\Install-Package SDO_dotNET -Version 1.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SDO_dotNET" Version="1.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SDO_dotNET --version 1.2.0
#r "nuget: SDO_dotNET, 1.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SDO_dotNET as a Cake Addin
#addin nuget:?package=SDO_dotNET&version=1.2.0

// Install SDO_dotNET as a Cake Tool
#tool nuget:?package=SDO_dotNET&version=1.2.0

private static void TestMySql() { /****************************************************************** * MySQL *******************************************************************/

string server = "localhost";
string database = "DEMODB";
string username = "root";
string password = "";

string connectionString = @"Data Source=" + server + "; Database=" + database + "; User ID=" + username + "; Password=" + password + ";";

//SDO db_conn = new SDO(connectionString);
SDO db_conn = new SDO(new MySqlConnection(connectionString));

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

string sql;
sql = "SELECT name, surname, email FROM users " +
	  "ORDER BY name;";
DataTable dtUsers = db_conn.SelectTable(sql);

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

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

}

private static void TestSqlServer() { /****************************************************************** * 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 + ";Connect Timeout=60";

//SDO db_conn = new SDO(connectionString);
SDO db_conn = new SDO(new SqlConnection(connectionString));

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

string sql = "SELECT TOP 10 ID, Message FROM Log4NetLog 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());
}

}

private static void TestSQLite() { /****************************************************************** * 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.");
	Console.ReadLine();
	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());
}

}

Product Compatible and additional computed target framework versions.
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.0 1,221 10/9/2020
1.1.0 780 9/27/2020
1.0.2 1,030 12/13/2018
1.0.1 978 12/9/2018

SQL Data Object .NetFramework.