using System; using System.Data.Odbc; class Baasiproov2a{ public static void Main(string[] arg){ string constr="Driver={Microsoft Access Driver (*.mdb)}; "+ "DBQ=d:\\kodu\\0606\\dotnet\\proovibaas2.mdb; "+ "Trusted_Connection=yes"; string lause="SELECT mark FROM autod"; OdbcConnection cn=new OdbcConnection(constr); cn.Open(); OdbcCommand cm = new OdbcCommand(lause, cn); OdbcDataReader reader=cm.ExecuteReader(); while(reader.Read()){ Console.WriteLine(reader.GetString(0)); } cn.Close(); } }