Click here to Skip to main content
15,893,622 members
Home / Discussions / C#
   

C#

 
AnswerRe: DataRow question Pin
Karthik Kalyanasundaram27-Jun-08 16:30
Karthik Kalyanasundaram27-Jun-08 16:30 
GeneralRe: DataRow question Pin
David Loring27-Jun-08 16:33
David Loring27-Jun-08 16:33 
QuestionWhat is it called when your class has a root collection and how do you do it in C#? Pin
qmuffs27-Jun-08 16:15
qmuffs27-Jun-08 16:15 
AnswerRe: What is it called when your class has a root collection and how do you do it in C#? Pin
Paul Conrad27-Jun-08 16:22
professionalPaul Conrad27-Jun-08 16:22 
GeneralRe: What is it called when your class has a root collection and how do you do it in C#? Pin
qmuffs27-Jun-08 16:30
qmuffs27-Jun-08 16:30 
AnswerRe: What is it called when your class has a root collection and how do you do it in C#? Pin
Karthik Kalyanasundaram27-Jun-08 16:37
Karthik Kalyanasundaram27-Jun-08 16:37 
GeneralRe: What is it called when your class has a root collection and how do you do it in C#? Pin
qmuffs27-Jun-08 16:41
qmuffs27-Jun-08 16:41 
QuestionADO.net locks out SQL2000 user account under load Pin
Mr Jen Withers27-Jun-08 11:11
Mr Jen Withers27-Jun-08 11:11 
This is a strange problem to describe so you will have to bear with me! I have developed a web application using c#.net that utilises server side ASPX pages that connect to a SQL2000 database. I have been load testing my application with the Microsoft Application Test Center that comes with Visual Studio 2003, with simulated loads of 10 - 400 users.

When I run a test against my web application for upwards of 10 concurrent users I start to get strange results from the database for what should be routine queries. I execute a simple query looking for a row in a table which I know is there (100% certain!) and the query returns the results to a dataset. I then get the first datatable from the dataset and check that the dataset.rows.count variable is greater then 0. Which it always is! I then proceed to look for a column that exists in the table which I specifically selected and an exception is thrown telling me the column doesnt exist in the datatable. This is actually impossible the data is DEFINATLEY there!

I can log into SQL Query analyser as the same SQL logon that the ASPX page uses to connect and run the same query and it returns the expected results without error or anaomoly.

Once an error of this type has occured, I can replicated it upto 10 minutes after it first has happened. During this 10 minute period I can switch the SQL logon the ASPX uses and it runs fine. As soon as I switch it back to the user on which the error occured it demonstrates the same problem again. After 10 minutes the problem disappears and wont happen again until I apply a heavy load to the server.

As an important note, I have now managed to replicate an identical problem with just 2 users trying to concurrently login.

Here is the snippet of code iam using to query the database:

public static DataSet execute_DataTable(String SQL_Command_String)
{

    String connectionString;

    connectionString = getConnectionString(@"..\xml_Settings\DB_Connect.xml");
    makeConnection(connectionString);

    DataSet dsResults = new DataSet();
    try
    {
        SqlDataAdapter dbAdapter = new SqlDataAdapter(SQL_Command_String, dbConn);
        dbAdapter.Fill(dsResults, "Results");
    }
    catch (Exception exp)
    {
        throw new Exception(exp.Message + " " + exp.StackTrace, exp);
    }
    finally
    {
        dbConn.Close();
    }
    return dsResults;
}


This function is located in a static class in a class library that compiles to a DLL that is then referenced in my web project. Every time an ASPX page requires to query the database this method is called.

When I load test my application a typical session will involve 2000 queries in a very short period of time. This is because I use a recursive c# function for generating a tree that executes alot of SQL queries.

Iam really out of ideas here guys , does any one have any ideas? All I can think of is disposing of the dataset when iam done?

Thanks in advance!

Mike
AnswerRe: ADO.net locks out SQL2000 user account under load Pin
Mark Churchill28-Jun-08 6:04
Mark Churchill28-Jun-08 6:04 
GeneralRe: ADO.net locks out SQL2000 user account under load Pin
Mr Jen Withers28-Jun-08 6:36
Mr Jen Withers28-Jun-08 6:36 
QuestionProblems withValidation Application Block and config files Pin
novicedotnetter27-Jun-08 10:10
novicedotnetter27-Jun-08 10:10 
QuestionSlow selection in ListView Pin
Xmen Real 27-Jun-08 8:06
professional Xmen Real 27-Jun-08 8:06 
AnswerRe: Slow selection in ListView Pin
J$27-Jun-08 10:04
J$27-Jun-08 10:04 
GeneralRe: Slow selection in ListView Pin
Xmen Real 27-Jun-08 12:36
professional Xmen Real 27-Jun-08 12:36 
GeneralRe: Slow selection in ListView Pin
Leblanc Meneses27-Jun-08 15:17
Leblanc Meneses27-Jun-08 15:17 
GeneralRe: Slow selection in ListView Pin
Xmen Real 27-Jun-08 15:28
professional Xmen Real 27-Jun-08 15:28 
QuestionInteresting Question---Related to Images Pin
paresh_sarjani27-Jun-08 7:03
paresh_sarjani27-Jun-08 7:03 
AnswerRe: Interesting Question---Related to Images Pin
Xmen Real 27-Jun-08 8:07
professional Xmen Real 27-Jun-08 8:07 
GeneralRe: Interesting Question---Related to Images Pin
paresh_sarjani28-Jun-08 7:13
paresh_sarjani28-Jun-08 7:13 
QuestionRe: Interesting Question---Related to Images Pin
CPallini27-Jun-08 10:33
mveCPallini27-Jun-08 10:33 
AnswerRe: Interesting Question---Related to Images Pin
Pete O'Hanlon27-Jun-08 10:46
mvePete O'Hanlon27-Jun-08 10:46 
GeneralRe: Interesting Question---Related to Images Pin
Luc Pattyn27-Jun-08 11:53
sitebuilderLuc Pattyn27-Jun-08 11:53 
AnswerRe: Interesting Question---Related to Images Pin
Christian Graus27-Jun-08 13:00
protectorChristian Graus27-Jun-08 13:00 
QuestionGraphics question (Newbie) Pin
kruegersck27-Jun-08 5:24
kruegersck27-Jun-08 5:24 
AnswerRe: Graphics question (Newbie) Pin
led mike27-Jun-08 5:54
led mike27-Jun-08 5:54 

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.