Click here to Skip to main content
15,065,044 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have a sql stored procedure to upload the group of files. when I run that procedure from front end half of the files are uploaded and the procedure is stopped suddenly. but when I run it from backend its running.I don't know the exact reason. Please can anyone help me.(Note: I am using IIS to run the application)


What I have tried:

its working in my system but not working in client system. I think its iis or db problem.

DAL.ExecuteDML("dbo.Proc_Upload_Batch", CommandType.StoredProcedure);


public int ExecuteDML(string ComandText, CommandType Commandtype, params SqlParameter[] parameters_values)
       {
           com = new SqlCommand();
           if (Session["Transaction"] != null)
           {
               com.Transaction = transaction;
           }
           com.Connection = GetConnection();
           com.CommandText = ComandText;
           com.CommandType = Commandtype;
           com.CommandTimeout = 0;
           foreach (SqlParameter param in parameters_values)
           {
               com.Parameters.Add(param);
           }

           int rowsaffected = com.ExecuteNonQuery();

           com.Dispose();
           return rowsaffected;
       }
-----------The codes to call the procedure
Posted
Updated 9-May-21 11:07am
v2
Comments
Richard MacCutchan 7-Apr-21 3:22am
   
A website has two main parts: the backend which runs on the server, and the front end which runs in the client's browser. The browser has no way to access the database in the server.
Richard Deeming 7-Apr-21 4:11am
   
There is a secret error somewhere in your secret code. You should fix that.

Seriously, how do you expect anyone to be able to help you fix your code based on this question?

We can't see your screen, we can't access your computer, and we can't read your mind. All we have to work with is the information you provide here.

Click the green "Improve question" link and update your question to include the relevant parts of your code, the full details of any errors, and the details of what you have done so far to try to debug the problem.
SeanChupas 7-Apr-21 9:28am
   
All you have to do is debug the code. You need to make sure the proper parameters are getting passed and that all the code is correct. We can't do that for you.

1 solution

Check your web config settings to make sure the timeout value is set high enough to process all the files, or spawn a file upload process for each file, so the timeout parameter does not have to be really large.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900