Click here to Skip to main content
15,901,001 members
Home / Discussions / Database
   

Database

 
AnswerRe: DTS - Data Transformation Services Pin
GuyThiebaut16-Oct-07 22:34
professionalGuyThiebaut16-Oct-07 22:34 
Questionhow to update table after query Pin
nibabug16-Oct-07 1:14
nibabug16-Oct-07 1:14 
AnswerRe: how to update table after query Pin
John-ph16-Oct-07 2:38
John-ph16-Oct-07 2:38 
GeneralRe: how to update table after query Pin
Mike Dimmick16-Oct-07 3:34
Mike Dimmick16-Oct-07 3:34 
GeneralRe: how to update table after query Pin
nibabug16-Oct-07 16:11
nibabug16-Oct-07 16:11 
QuestionHow to Convert a project from sql 2000 to 2005 in asp.net Pin
scicorp15-Oct-07 23:49
scicorp15-Oct-07 23:49 
AnswerRe: How to Convert a project from sql 2000 to 2005 in asp.net Pin
Christian Graus16-Oct-07 1:10
protectorChristian Graus16-Oct-07 1:10 
Questionwhile loop in stored procedure Pin
Sonia Gupta15-Oct-07 22:19
Sonia Gupta15-Oct-07 22:19 
AnswerRe: while loop in stored procedure Pin
Giorgi Dalakishvili15-Oct-07 22:41
mentorGiorgi Dalakishvili15-Oct-07 22:41 
AnswerRe: while loop in stored procedure Pin
Hesham Amin16-Oct-07 3:42
Hesham Amin16-Oct-07 3:42 
QuestionSQL and ClickOnce Pin
Polymorpher15-Oct-07 11:52
Polymorpher15-Oct-07 11:52 
QuestionCascading Product Variants (E-Commerce) Pin
mm-2k15-Oct-07 7:56
mm-2k15-Oct-07 7:56 
AnswerRe: Cascading Product Variants (E-Commerce) Pin
pmarfleet15-Oct-07 9:28
pmarfleet15-Oct-07 9:28 
QuestionSql Server Windows Authentication Mode in Workgroup Environment? Pin
DotNetWWW15-Oct-07 4:52
DotNetWWW15-Oct-07 4:52 
AnswerRe: Sql Server Windows Authentication Mode in Workgroup Environment? Pin
Pete O'Hanlon15-Oct-07 5:09
mvePete O'Hanlon15-Oct-07 5:09 
GeneralRe: Sql Server Windows Authentication Mode in Workgroup Environment? Pin
DotNetWWW15-Oct-07 6:33
DotNetWWW15-Oct-07 6:33 
GeneralRe: Sql Server Windows Authentication Mode in Workgroup Environment? Pin
Laxman Auti16-Oct-07 23:31
Laxman Auti16-Oct-07 23:31 
GeneralRe: Sql Server Windows Authentication Mode in Workgroup Environment? Pin
DotNetWWW17-Oct-07 2:44
DotNetWWW17-Oct-07 2:44 
Questionadd new user to sql server database 2005 Pin
Gazide15-Oct-07 3:50
Gazide15-Oct-07 3:50 
AnswerRe: add new user to sql server database 2005 Pin
Giorgi Dalakishvili15-Oct-07 4:02
mentorGiorgi Dalakishvili15-Oct-07 4:02 
GeneralRe: add new user to sql server database 2005 Pin
Hesham Amin16-Oct-07 3:49
Hesham Amin16-Oct-07 3:49 
QuestionTimeout problem Pin
gratisaccount15-Oct-07 3:46
gratisaccount15-Oct-07 3:46 
Hi All,

I have wrote stored procedure which calculates points for result for around 1000 users.

This procedure takes no parameters from asp.net code.

asp.net code is used for just for calling this procedure. But when I run this procedure from the code it gives me the timout error.

while running from the sql server itself it works fine.

Kindly tell me how can I overcome this problem?

Below is my code, which is giving me the error.

try

{

Helper connHLP = new Helper(false);
connHLP.Retrieve("prcUpdateUsePoints", null);


}catch (Exception ex)
{

throw ex;

}

----------------------------------------------------------------------------------------------------------------------

Code for connection & retrive:

private SqlConnection conn;
private SqlTransaction tran;

public Helper(bool TransactionRequired)
{

try

{

string strConn = string.Empty;
strConn = System.Configuration.ConfigurationManager.AppSettings["ConnectionString"].ToString();

conn = new SqlConnection(strConn);
conn.Open();

if (TransactionRequired == true)
{

tran = conn.BeginTransaction();

}

else

{

tran = null;
}

}

catch (Exception ex)
{

throw ex;
}

}

public DataSet Retrieve(string ProcedureName, SqlParameter[] ParamCollection)
{

try

{

DataSet ds = new DataSet();SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;

if (ParamCollection != null)
SetParameters(cmd, ParamCollection);

cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = ProcedureName;

SqlDataAdapter adp = new SqlDataAdapter(cmd);
adp.Fill(ds);

return ds;
}

catch (Exception ex)
{

throw ex;
}

finally

{

conn.Close();

}

}



public void SetParameters(SqlCommand cmd, SqlParameter[] ParamCollection)
{

try

{

foreach (SqlParameter param in ParamCollection)
cmd.Parameters.Add(param);

}

catch (Exception ex)
{

throw ex;
}

}

----------------------------------------------------------------------------------------------------------------------


Thnking you all in advance.

AnswerRe: Timeout problem Pin
kubben15-Oct-07 3:54
kubben15-Oct-07 3:54 
AnswerRe: Timeout problem Pin
Mike Dimmick15-Oct-07 3:56
Mike Dimmick15-Oct-07 3:56 
AnswerRe: Timeout problem Pin
gratisaccount15-Oct-07 18:51
gratisaccount15-Oct-07 18:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.