Hi,
I need to insert the entries of the log file into a database table..
I have made a stored procedure but there is some problem .............I am unable to rectify that.........
SqlConnection con=new SqlConnection(" Data Source=******** ***;Initial Catalog=WebServ icesLogFiles;Us er Id=sa;Password= sa;");
con.Open();
SqlCommand com=new SqlCommand("usp _addlogintotabl e",con);
com.Parameters. Add(new SqlParameter("@ LogDateTime",Sq lDbType.DateTim e,0,"LogDateTim e"));
com.Parameters. Add(new SqlParameter("@ MethodName",Sql DbType.VarChar, 50,"MethodName" ));
com.Parameters. Add(new SqlParameter("@ Status",SqlDbTy pe.Int,0,"Statu s"));
com.Parameters. Add(new SqlParameter("@ Message",SqlDbT ype.VarChar,100 ,"Message")) ;
com.CommandType =CommandType.St oredProcedure;
// com.Prepare();
com.ExecuteNonQ uery();
con.Close();
I need to insert the entries of the log file into a database table..
I have made a stored procedure but there is some problem .............I am unable to rectify that.........
SqlConnection con=new SqlConnection(" Data Source=******** ***;Initial Catalog=WebServ icesLogFiles;Us er Id=sa;Password= sa;");
con.Open();
SqlCommand com=new SqlCommand("usp _addlogintotabl e",con);
com.Parameters. Add(new SqlParameter("@ LogDateTime",Sq lDbType.DateTim e,0,"LogDateTim e"));
com.Parameters. Add(new SqlParameter("@ MethodName",Sql DbType.VarChar, 50,"MethodName" ));
com.Parameters. Add(new SqlParameter("@ Status",SqlDbTy pe.Int,0,"Statu s"));
com.Parameters. Add(new SqlParameter("@ Message",SqlDbT ype.VarChar,100 ,"Message")) ;
com.CommandType =CommandType.St oredProcedure;
// com.Prepare();
com.ExecuteNonQ uery();
con.Close();
Comment