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=WebServicesLogFiles;User Id=sa;Password=sa;");
con.Open();
SqlCommand com=new SqlCommand("usp_addlogintotable",con);
com.Parameters.Add(new SqlParameter("@LogDateTime",SqlDbType.DateTime,0," LogDateTime"));
com.Parameters.Add(new SqlParameter("@MethodName",SqlDbType.VarChar,50,"M ethodName"));
com.Parameters.Add(new SqlParameter("@Status",SqlDbType.Int,0,"Status"));
com.Parameters.Add(new SqlParameter("@Message",SqlDbType.VarChar,100,"Mes sage"));
com.CommandType=CommandType.StoredProcedure;
// com.Prepare();
com.ExecuteNonQuery();
con.Close();