private void button2_Click(object sender, EventArgs e) { // Load balls int[] ball_calls; int n; String command = "select "; for (n = 0; n < 45; n++) { if (n > 0) { command += ","; } command += "call_" + n.ToString("00"); } command += " from ball_calls_aways"; DsnConnection dsn; dsn = new DsnConnection("ballcalls.db"); DbDataReader reader = dsn.ExecuteReader(command); if (reader.HasRows) { while (reader.Read()) { int[] ballset = new int[45]; int ball; for (ball = 0; ball < 45; ball++) { ballset[ball] = Convert.ToInt32(reader[ball]); } calls.Add(ballset); } } }
void t_Tick(object sender, EventArgs e) { DbDataReader reader = dsn.ExecuteReader("select 1"); if (reader.HasRows) { while (reader.Read()) { } } }