W
Wavounet
I use .Net 2.0 and connect to a database access, on the
connection.open() I've this message "The type initializer for
'System.Transactions.Diagnotics.DiagnosticTrace' threw an exception"
Code :
public DataSet GetData(string SqlQuery)
{
using (OleDbConnection connection = new
OleDbConnection(m_ConnectionString))
{
connection.Open();
OleDbCommand command = new OleDbCommand(SqlQuery,
connection);
command.CommandType = CommandType.Text;
OleDbDataAdapter adapter = new
OleDbDataAdapter(command);
DataSet ds = new DataSet();
adapter.Fill(ds);
connection.Close();
return ds;
}
}
Thanks for your help
connection.open() I've this message "The type initializer for
'System.Transactions.Diagnotics.DiagnosticTrace' threw an exception"
Code :
public DataSet GetData(string SqlQuery)
{
using (OleDbConnection connection = new
OleDbConnection(m_ConnectionString))
{
connection.Open();
OleDbCommand command = new OleDbCommand(SqlQuery,
connection);
command.CommandType = CommandType.Text;
OleDbDataAdapter adapter = new
OleDbDataAdapter(command);
DataSet ds = new DataSet();
adapter.Fill(ds);
connection.Close();
return ds;
}
}
Thanks for your help