SDO_dotNET 1.2.0

.NET Framework 4.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.
dotnet add package SDO_dotNET --version 1.2.0
<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, C# scripting and .NET Interactive. 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 Versions
.NET Framework net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
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 465 10/9/2020
1.1.0 247 9/27/2020
1.0.2 541 12/13/2018
1.0.1 472 12/9/2018

SQL Data Object .NetFramework.