hey, can some please tell me how i can get this code to work
im trying it to get all the data in table a1Code:System.Data.OleDb.OleDbConnection s; s = new System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=f:\\c#\\myDB.mdb"); s.Open(); System.Data.OleDb.OleDbCommand c; c=new System.Data.OleDb.OleDbCommand("select * from a1",s); System.Data.OleDb.OleDbDataReader r; r= c.ExecuteReader(); System.Console.WriteLine(r.Read()); int i; for(i=0;i<=r.Read.count;i++){ System.Console.WriteLine("{0}",r.GetValue(i)); }
thnx




Reply With Quote