using System;
using System.Data.OleDb;

namespace banco1.persistencia
{
	public class Broker
	{
		protected OleDbConnection mBD=null;
	
		public Broker() 
		{
			String cad="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" +
				"C:\\Documents and Settings\\mpolo\\My Documents\\Visual Studio Projects\\banco5\\banco.mdb";
			mBD=new OleDbConnection(cad);
			mBD.Open();
		}

		public static OleDbConnection getBD() 
		{
			Broker broker=new Broker();
			return broker.mBD;
		}

		public static OleDbCommand getCommand(String SQL) 
		{
			OleDbCommand cmd=new OleDbCommand(SQL);
			cmd.Connection=getBD();
			return cmd;
		}

		public void close() 
		{
			mBD.Close();
		}
	}
}
