473,388 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

BIG PROBLEM! Debugger hanging on sql server code debugging

Ok, while debugging, when I use f10 or f11 to step in, the debugger
stops working.

It just hangs indefinitely, no matter which line I f10 or f11 on (as
below). This is a BIG PROBLEM, and it is specific to debugging code
blocks where sql server connections/commands/data adapter are used,
but nowhere else.

After the hang, I have to restart VS.net (version 2003), but then,
when I try to build, it says "file could not be copied to output
directory because another process is using the file"

Any clues?

/********* example ************/

using System.Data;
using System.Data.SqlClient;

// in a class somewhere:
using (SqlCommand sco = new SqlCommand()) {
sco.CommandText = procName;
using (SqlConnection sconn = new SqlConnection()) {
sconn.ConnectionString =
ConfigurationSettings.AppSettings["ConnectionString"];
sco.Connection = sconn;
sco.CommandType = CommandType.StoredProcedure;

sco.Parameters.Add(new SqlParameter("@numRecords",
SqlDbType.Int));
sco.Parameters["@numRecords"].Direction =
ParameterDirection.Input;
sco.Parameters["@numRecords"].Value = queueBatchSize;

sco.Parameters.Add(new SqlParameter("@threadName",
SqlDbType.VarChar));
sco.Parameters["@threadName"].Direction =
ParameterDirection.Input;
sco.Parameters["@threadName"].Value = Thread.CurrentThread.Name;

sco.Parameters.Add(new SqlParameter("@state", SqlDbType.Char));
sco.Parameters["@state"].Direction = ParameterDirection.Input;
sco.Parameters["@state"].Value = (int)state;

using(SqlDataAdapter sda = new SqlDataAdapter(sco)) {
using(DataSet d = new DataSet()) {
try {
sda.Fill(d);
foreach (DataRow dr in d.Tables[0].Rows) {
// do work
}
} catch (Exception exp) {
Trace.WriteLine("Exception: " + exp.Message + " Thrown
by " + GetType().ToString());
}
}
}
}
}
Nov 13 '05 #1
0 1146

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

117
by: Peter Olcott | last post by:
www.halting-problem.com
0
by: James Griffiths | last post by:
Here is a report I've written about a printing problem that is being experienced by a particular company for whom I had developed a A97 system. After upgrading to Win XP and AXP, some printing...
18
by: Ian Stanley | last post by:
Hi, Continuing my strcat segmentation fault posting- I have a problem which occurs when appending two sting literals using strcat. I have tried to fix it by writing my own function that does the...
4
by: Trond Meistad | last post by:
I have a website where I run a simple asp.net web application. On Sunday night, requests to this webapplication started to time out. After much debuggeing with no result, I created a new...
5
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.