All pastes #233280 Raw Edit

Stuff

public text v1 · immutable
·published 2006-11-01 21:28 UTC
rendered paste body
using System;
using System.Data;
using System.Data.OleDb;

namespace ConsoleApplication1
{
	/// <summary>
	/// Summary description for Class1.
	/// </summary>
	class Class1
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main(string[] args)
		{
			try
			{
				string cs= "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=d:\\tmp\\test.mdb";
				OleDbConnection conn = new OleDbConnection(cs);
				conn.Open();
				using(IDbCommand com = conn.CreateCommand())
				{
					com.CommandText = "update test set b = true";
					com.ExecuteNonQuery();
				}
			}
			catch(OleDbException e)
			{
				System.Console.WriteLine(e.Message);
			}
		}
	}
}