huge transfer with OleDbCommand
I have a strange problem. I have a .sql file that containts 3000 insert commands. I read every line and execute the command on the database. Till there there is no problem, it reads everything and executes everything.
But if i watch to my datatransfer over the network, i have send and received 260Mb. That couldn't be normal.
I work with OleDbCommand.ExecuteNonQuery, and maybe there will be the problem?
this is my code:
private OleDbConnection myConn;
public create_database()
{
string connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=//cpc-srv/datanl/testmap-stage/bank_database.mdb";
myConn = new OleDbConnection(connStr);
myConn.Open();
}
protected override void Dispose( bool disposing )
{ myConn.Close();
}
public string doe(string commando)
{
OleDbCommand comm = new OleDbCommand(commando,myConn);
comm.ExecuteNonQuery();
}
private void start(object sender, System.EventArgs e)
{
StreamReader objReader = new StreamReader("c:\\datab.sql");
string sLine="";
while (sLine != null)
{
sLine = objReader.ReadLine();
if (sLine != null && sLine!="") doe(sLine);
}
objReader.Close();
}