1 string text = File.ReadAllText(file_name);
2 text = text.Replace("'", "''");
3 File.WriteAllText(file_name, text);
4
5 conn = new OdbcConnection("Provider=MSDASQL;DSN=" + DSN + ";");
6 conn.Open();
7 ds = new DataSet();
8 OdbcDataAdapter adapter = new OdbcDataAdapter();
9 adapter.SelectCommand = new OdbcCommand("SELECT " + ((distinct_clause) ? "DISTINCT" : "") + " * FROM " + file_name + ((where_condition != "" && where_condition != null) ? " WHERE " + where_condition : "") + ((ordering != "" && ordering != null) ? " ORDER BY " + ordering : ""), conn);
10 adapter.Fill(ds);