OleDB_dotNET 1.2.0

.NET Framework 4.0
NuGet\Install-Package OleDB_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 OleDB_dotNET --version 1.2.0
<PackageReference Include="OleDB_dotNET" Version="1.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OleDB_dotNET --version 1.2.0
#r "nuget: OleDB_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 OleDB_dotNET as a Cake Addin
#addin nuget:?package=OleDB_dotNET&version=1.2.0

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

Example: using OleDB;

class Program { static void Main(string[] args) { string server = "Microsoft.Jet.OLEDB.4.0"; string dbName = "database.mdb"; string database = AppDomain.CurrentDomain.BaseDirectory + "App_Data\" + dbName; string password = "GO34dsD"; string connectionString = "Provider=" + server + ";" + "Data Source=" + database + ";" + "Jet OLEDB:Database " + "Password=" + password;

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

		string sql = "SELECT Id, Application FROM pwdmanager ORDER BY Updatetd_at DESC;";
		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("Application: " + dr["Application"].ToString().Trim());
		}
	}

	InserisciLibro(connectionString);
}

private static bool InserisciLibro(string connectionString)
{
	bool isSuccess = false;
	using (DBConnection db_conn = new DBConnection(connectionString))
	{
		string sql = @"INSERT INTO book (Application, Type) VALUES ('Test', 'Social');";
		if (db_conn.sql_query(sql))
		{
			int insertedID = db_conn.GetLastInsertedRowID();
			Console.WriteLine("GetLastInsertedRowID: " + insertedID);

			int recordsAffected = db_conn.GetNumRecordsAffected();
			Console.WriteLine("GetNumRecordsAffected: " + recordsAffected);
		}
	}
	return isSuccess;
}

}

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.

This package has no dependencies.

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 694 10/13/2020
1.1.0 259 9/27/2020
1.0.0 1,747 8/15/2018

Extensions on the OleDb .NetFramework.