المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : how to fasten the datareader and insert process



C# Programming
06-25-2009, 05:30 PM
The below command writes not fast enough. Is there any way to fasten it.
Stored procedure is not an option for now.
It writes to Access via data reader from as400



olecmd.CommandText = "INSERT INTO NXAC08 " + "([Article], [Store], [Year], [Month], [Day],
[Unit], [Value], [Discount]) Values (" + dr["Article"].ToString() + ", " + dr["Store"].ToString()
+ ", " + dr["Year"].ToString() + ", " + dr["Mounth"].ToString() + ", " + dr["Day"].ToString() + ", "
+ dr["UNIT"] + ", " + dr["VALUE"].ToString() + ", 0)";
olecmd.ExecuteNonQuery();