Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
all groups > c# > june 2007 > threads for thursday june 14

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

Insert Help
Posted by Rafael at 6/14/2007 11:24:54 PM
I'm receiving this error from the code below. Unclosed quotation mark before the character string '+1)'. Line 1: Incorrect syntax near ' + 1)'.). string InsertDeptType = "INSERT INTO Department(Department_Id, Department_Desc, Ok_To_Use)"+ " values ('"+ Guid.NewGuid().ToString() + ...more >>


multithread in an application WEB? ??
Posted by AAAAA at 6/14/2007 11:19:21 PM
Hi friends, So that you would use multithread in an application WEB? Thanks Cesar ...more >>

Help files
Posted by John Brown at 6/14/2007 9:42:08 PM
Hi there, This might be a little off-topic here but can some simply tell me what the current standard is for creating context sensitive help for my app (presumably using the "Help" class). Should I be researching ".chm" files for instance and what tools for authoring the help should I inve...more >>

About Asynchronous method invocation
Posted by Morgan Cheng at 6/14/2007 7:43:07 PM
Asynchronous method model generally has a callback delegate as argument. The delegate will be called when some WaitHandle is set or time out. And, one more argument is used as state object to transfer any customized data into callback delegate. I believe that is un- necessary. For example, p...more >>

RemoveAll for a SortedList
Posted by Michael Nesslinger at 6/14/2007 7:04:25 PM
Hello, i am looking for an easy way to do a "RemoveAll(Predicate<T> match)" for a SortedList like it is possible for a List. My first question is: Why is the Method not available for the SortedList. And my second one: How can it be done the best (fastest) way for a SortedList Thanks f...more >>

Enable/Disable local active directory account from code?
Posted by Michael Howes at 6/14/2007 6:44:19 PM
This MSDN article http://msdn2.microsoft.com/en-us/library/ms180913(vs.80).aspx and this codeproject article http://www.codeproject.com/useritems/everythingInAD.asp both show the same c# code for enabling and disabling active directory accounts. I'm trying to do that to a local user acc...more >>

Geospatial Annotation Project
Posted by Tony McLaughlin at 6/14/2007 5:33:08 PM
This is my first post to this ng, please bare with me if the topic is not germaine. I represent a group of investors seeking input, developer participation and open source collaboration on a geospatial annotation social bookmarking application. Our project aims to develop a web app that allo...more >>

Error handling issue: which one is better, multiple catches/throw or cast System.Exception to its runtime type?
Posted by Carol at 6/14/2007 5:32:57 PM
Exception may be thrown in the code inside the try block. I want to handling the SqlException with State == 1 in a special way, and for all others I want to use a general way to handle. Which of the following options is better? ----------------------------------------------------- Option 1: tr...more >>



Property Block Accessibility
Posted by Mike Labosh at 6/14/2007 5:14:42 PM
In C# 2003, is there a way to phrase a property block so that the getter is public and the setter is internal? How about in 2005? -- Peace & happy computing, Mike Labosh, MCSD MCT Owner, vbSensei.Com "The power to query ADSI is a power only one has achieved, but if we work together, ...more >>

Order of Items in a collection object
Posted by Sugandh Jain at 6/14/2007 4:52:13 PM
Hi, I am developing using MS Visual Studio .net 2005, c# 2.0. My query/confusion is as follows: If I have a collection of a particular type of object. While moving in the collection using foreach or forloop, will I get the taxlots in the same order in which they were inserted into the ...more >>

Attributes and interfaces
Posted by Frank Rizzo at 6/14/2007 4:10:48 PM
I have an interface which has a bunch of methods defined that all the inheriting classes will have to implement. How can I force the inheriting classes to have a class attribute? Something like this (except it does not compile) [AttributeUsage(AttributeTargets.Class | AttributeTargets.Inte...more >>

Thread sincronization using lock.
Posted by Beto at 6/14/2007 3:52:03 PM
I have tested that using locks for sinchronize calls to a web service does not work correctly. Surely I am doing something wrong. I have a "global" object for the "semaphore": public object oLockOfWebService = new object(); And we have two concurrent libraries (one in c# and an...more >>

Reference Vs Value array
Posted by Neil Chambers at 6/14/2007 3:30:05 PM
I'm currently using multidimensional arrays in PoSH by assigning values to index positions. I'm doing this because AFAIK there is no way to initialise an array simply with the 'number' of dimensions required. So, for example, I would initialise an array with 3 x 2 dimensions thusly: $myAr...more >>

BindingSource
Posted by shark at 6/14/2007 3:00:30 PM
Hi Does BindingSource have any information about column which is being edited (i.e. editing editing data in grid)? Thx Shark ...more >>

Error with "internal interface"
Posted by ~~~ .NET Ed ~~~ at 6/14/2007 2:39:03 PM
I am facing a problem. My project is composed of several assemblies. In one of them -the backend- I have several internal classes that must implement an interface. These internal classes are only used by one master class that is public. I am able to declare the interface as "internal interf...more >>

FileSystemWatcher invalid directory name
Posted by stahlerw at 6/14/2007 2:01:01 PM
I have written a windows service to watch a folder for newly created documents. Works fine when watching directories on my local machine, but always get a "directory invalid" error when I either try to watch a UNC path or mapped drive. Any ideas? Thanks! Wes...more >>

WebServices exception
Posted by weird0 at 6/14/2007 1:54:10 PM
When i execute the desktop application that creates a webservice obj and connects to a db, it gives the following exception: Server was unable to process request---> An error occured while establishing connection to the server. When connecting SQL Server 2005, this failure may be caused by t...more >>

Using ODBC with C# 2005 Express Edition
Posted by Colin Williams at 6/14/2007 1:39:40 PM
Hi I have some paradox db's i need to connect to. I have figured out that i can do this using ODBC, however C# Express edition does not support this connectivity easily and must be done programmatically. I have a class to do this: public static class Data { public const string...more >>

Programming Language Popularity // Looking for Concrete Info
Posted by sloan at 6/14/2007 1:34:12 PM
I found these (2 links below). Does anyone know of any (neutral) reference sites for this kind of information? http://www.itjungle.com/tug/tug121406-story03.html Microsoft's Visual Basic 6 and Visual Basic.NET language is taking a serious beating in the development cubicles of the United Stat...more >>

int n = default(System.Int32);
Posted by Hardy Wang at 6/14/2007 1:26:02 PM
Hi guys, what does "default" here mean? What is the MSDN Library Help URL related to this explanation? -- Regards Hardy...more >>

Accessing private attributes from within classes
Posted by Beorne at 6/14/2007 1:24:07 PM
In the classes I develop my attributes are always private and are exposed using properties. >From within the class is more correct to access the attributes directly or to access the attributes using the properties? Does "wrapper" setter/getter properties introduce time overhead in execution? ...more >>

IDbDataParameter
Posted by Fred Chateau at 6/14/2007 1:13:14 PM
Could someone please tell me how to create an array using the IDbDataParameter? -- Regards, Fred Chateau fchateauAtComcastDotNet ...more >>

DateTime.Parse() vs DateTime.ParseExact()
Posted by Peter Duniho at 6/14/2007 12:51:24 PM
I'm sure there's a good explanation for this, but I can't figure it out.= I tried using DateTime.Parse() with a custom DateTimeFormatInfo instance= , = in which I'd replaced the DateTimeFormatInfo.FullDateTimePattern propert= y = with my custom format string: DateTimeFormatInf...more >>

Combo autosize dropdown lf/rt?
Posted by randy1200 at 6/14/2007 12:45:00 PM
The code below goes into the dropdown event handler for a standard combo box. It makes the dropdown as wide as the widest text entry. Unfortunately, this combo box is on the right edge of the screen, so if the user has a really wide entry, the dropdown expands off the right edge of the screen....more >>

Reverse Changes
Posted by BD at 6/14/2007 12:08:24 PM
I want to place a button on a form so the user can reverse data entry changes to an existing record. Does anyone have any ideas on how to code this. The form has 2 datagridviews on it as well. Thanks in advance, BD ...more >>

Interop, PInvoke data coming from an umanaged source
Posted by Tonofit at 6/14/2007 12:07:02 PM
I've got the following umanaged code that I need to handle in C# code. The data I read comes from an external device, by Read(ID, &data, REGLEN); How should the code look for the structs in C# to handle "PULONG Value" in the function call and the "PktArray[0].pbyBuf = (PUCHAR)&regAddr;" ...more >>

initializing an array in C#
Posted by Vinki at 6/14/2007 11:10:02 AM
Hello everyone, I want to put values inside array in if statement. so I declared an array string[] ar = new ar[5]; if (x=="10) ar={"c", "d", "e","f"} else ar={"a", "b", "c","d"} this gives me an error Invalid expression term "{" can anyone tell me what am I doing wrong. ...more >>

Issue with Equals on List
Posted by sachy at 6/14/2007 10:16:03 AM
Hi, I have to find an object of Employee (Say 'Empl') in a list of objects of Employees (EmployeeList). The object Empl inturn has a list of objects (say List of Children objects ) in it. I have used Find method with predicate as follows, Class Employee { string name; List<Chil...more >>

Marking code deprecated
Posted by michael sorens at 6/14/2007 9:43:03 AM
How do I mark a method or class in my library as deprecated, so that when it is used by some other application, the compiler will issue a warning?...more >>

Suspending all control events for a form
Posted by Ray Mitchell at 6/14/2007 8:37:03 AM
I have a form with a bunch (maybe 30) different controls that generate events when changed, clicked, etc. The various event handlers in turn might change some of these controls, thereby causing other events, which is not what I want. So, is there a simple way to turn off all events for a par...more >>

Missing DLL Source Code
Posted by Mo at 6/14/2007 8:10:42 AM
Hi, I am working on a project where the source code for a dll is missing. The dll is used all over the project. I registered the DLL with the server but when I try to use I am getting an error: "Data source name not found and no default driver specified " No body knows what datasource or ...more >>

Progress maximum value on XML serialisation
Posted by Manikandan at 6/14/2007 8:09:52 AM
Hi, I'm working with XML serialization. I'm writing a xml file of huge size(above 500MB) I need to show the user the progress of writing to file using progress bar. For this i need to create a thread and first start the thread and then writing process, after writing to file stop the thread My...more >>

Code to parse a SQL Result into list of datatables
Posted by Sam Shrefler at 6/14/2007 7:31:09 AM
Is there any code part of the .NET Framework or any suggestions at the best way to handle the following situation? Results from SQL Select statement: MeasureDate | Name | Width | Height 01/01/07 | Flower | 10 | 10 01/01/07 | Tree | 11 | 11 01/01/07 | Bush | 12 | 12 02/01/07 | Flower | 11 ...more >>

Getting the reference to the control add to a TabControl
Posted by sravan_reddy001 at 6/14/2007 7:23:53 AM
I created a tabcontrol toolin my application.(actually i am creating a tabbed browser) when the user clicks on the newtab button(provided by me) the new tab is added and the webbrowser control is added to that by the following code. TabPage t = new TabPage(); t.Text...more >>

determine remoting configuration in runtime
Posted by My interest at 6/14/2007 6:16:40 AM
Is it possible to determine the remoting settting in runtime from within the host class? Assuming I have a class Bar whose listening URI is tcp://localhost:2345/Bar. This URI is specified in the app.cfg and the remoting configuration is done using RemotingCOnfiguration.Config(). Is there anyw...more >>

Dynamic debugging problem
Posted by alexis.meilland NO[at]SPAM gmail.com at 6/14/2007 4:58:41 AM
Hello, Well, I have a problem with a dynamic debuging. My program is winform program written in Managed c++. I compile dynamically a dll in vb.net. It works well. To execute a function in my dll I use the invoke function. It works well. However, I would like, if there is a runtime error...more >>

C# Byte/Short Mathematics
Posted by NvrBst at 6/14/2007 4:31:09 AM
is there anyway to use bytes with numbers without actually casting at the end? byte Test = 10; byte row = Test - 5; Return Error: Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) I seen some integer-type-suffix's ulong Test = 10; u...more >>

Picture box and deleting file
Posted by FrankB at 6/14/2007 4:09:52 AM
Hello, after setting another image to the picture box it is not possible to delete the last shown file via File.Delete ( sFilename). Path of image file is correct. Error message box says: file is being used by other process. Is there a way to "free" the file? Thank you for your help. ...more >>

Convert international characters
Posted by Peter K at 6/14/2007 4:08:46 AM
Hi I am writing an application where I need to process some text read from files, and write information to a content-management-system. Unfortunately the CMS does not accept international characters in some text strings (eg for names of entities), like the Danish Å, Ø, Æ. Is there an i...more >>

Adding Sound file to C# Application
Posted by sravan_reddy001 at 6/14/2007 3:52:08 AM
i want a sound to be generated when and event occurs. especially when a message box is displayed and when an user want to close a form(i want to include this in the form closing event) thanks... Sravan ...more >>

Picture box displays an edge on right and bottom border
Posted by Amit at 6/14/2007 2:57:30 AM
Hi We are using picurebox for displaying images in our application. The images are colored bitmaps generated within the application. When the bitmap is pasted to the Picurebox using graphics.DrawImage() in Paint event handler, it is displayed. However, there is a thin dark edge also displayed...more >>

Number of combinations
Posted by csfong33 NO[at]SPAM gmail.com at 6/14/2007 2:16:43 AM
Hi, I have arrays below: arr1 = { a, b, c} arr2 = {1, 2, 3} arr3 = {x, y, z} I want to get a combination of these array, as below arr_result = { "a1x", "a1y", "a1z", "a2x", "a2y", "a2z", "a3x", "a3y", "a3z", "b1x", "b1y", "b1z", "b2x", "b2y", "b2z", "b3x", "b3y", "b...more >>

How to clear up all attached event handlers.
Posted by zlf at 6/14/2007 1:09:06 AM
I have an UserControl created by other component, its creator attachs some event handlers to MouseDoubleClick event, but I do not like those events to be triggered while it is db-clicked. I want to know how to clear up them? Thanks BTW: I do not know what specific event handlers are attache...more >>

Question Regarding Framework 3.0
Posted by BuddyWork at 6/14/2007 1:00:01 AM
Hello, I want to know if the Framework 3.0 has support for Tibco or can I just reference the Tibco library and use it as if I was writing the code in C#. Also I have a FIX object, can I use this within Framework 3.0 as well. Finally how does Framework 3.0 run the workflow task. For exampl...more >>

How to print gridview values in web application.
Posted by pappu at 6/14/2007 12:42:51 AM
Hello friends, I am working on one of web application which needs to print datagrid values on one of the button click event.So can anybody please help me out. thanks, Sachin. ...more >>

WPF and WCF books
Posted by Moty Michaely at 6/14/2007 12:00:00 AM
Hey Guys, Can anyone please recommend good books about regarding WPF and WCF (and of course .NET 3.0). Please do not recommend the web. I need books :) Thanks in advance, Moty ...more >>

Which class(es) should I use for an HTML Parser?
Posted by Jack at 6/14/2007 12:00:00 AM
How to quickly build an HTML parser with C#? Does anything like "HTMLParser" exist? Thanks in advance Jack ...more >>

StreamWriter invalidates web service cache: bug?
Posted by BLUE at 6/14/2007 12:00:00 AM
I insert a string in cache in a property set and I retrieve that string in the get. I retrieve my string with Read web method and I insert it with Write web method: to try cache I do Read, Write, Read. When I do the second Read, string is null if in the property set, before/after inserti...more >>

UAC Issues On Vista
Posted by Stephany Young at 6/14/2007 12:00:00 AM
Even though I had my roots and highlights redone just a few days ago, I don't understand why I appear to be having an ongoing blond moment. Is it just me or do others among you not 'get' how to make C# and VB.Net applications play nicely with the the UAC on Vista. I have read and reread ev...more >>

ToolTip only shows once
Posted by Rainer Queck at 6/14/2007 12:00:00 AM
Hi NG, working on a project in VS2005 I started to add ToolTips. My problem now is, that each ToolTip only shows once. mouving the mouse over a button shows its tooltip, moving to the next button show the coresponding tooltib. If I now move back to the first button the tooltip does not popup...more >>

How to retrieve a DetailsView
Posted by Jason Huang at 6/14/2007 12:00:00 AM
Hi, In the ASP.Net C# Web, I have a DeatailsView like this: First Name: John Last Name: Dole SSN:XXXXXXXXX Address: LA I don't know how to retrieve the value of the 'LA'. Would someone give me some advice? Thanks for help. Jason ...more >>

How to customize the Label and set the property of AutoSize to False?
Posted by Ryou kaihou at 6/14/2007 12:00:00 AM
As we known, in Visual Stdio 2003 or 2005, the property of Autosize of Label is set to True by defaut, how can I customize this and set property of Autosize to False? Any ideas? Thanks ...more >>

Casting integer type to real state in a DetailsView
Posted by Jason Huang at 6/14/2007 12:00:00 AM
Hi, In my C# Net 2.0, in a DetailsView I have a row TestStatus, and the output will be interger 0, 1, where the 0 presents Pass, 1 presents Fail. What do I need to do so that the output will be "Pass" and "Fail", not the integer style 0,1? Thanks for help. Jason ...more >>


DevelopmentNow Blog