Answer Questions
anders_sms Problem with the CData Section while using an Xslt
Hi, I have an Xml that contains a CData section. This CData section is usually used to store Xml elements of its own, but it was separated so that it would be able to store any kind of Xml (and to keep it general, because in one of the days we may want it to keep anything other than Xml). The problem is when I'm using an Xslt and I'm trying to retreive the data in the CData section. I keep getting it with escaped characters. For example, if my Xml is: <ROOT> <Node1>Value</Node1> <![CData[ <InnerXmlElement>Hello World</InnerXmlElement> ]]> </ROOT> and the Xslt is (without all the headers. ...Show All
Duckboy .NET Runtime 2.0 Error Reporting
I run a VS2005 application on a Win XP (Greek localized version) that connects to a remote SQL 2005. The application run smoothly but when I shutdown the application I get, sometimes, the error: EventType clr20r3 , P1 itemtracker.exe, P2 1.0.0.0, P3 45b8c139, P4 microsoft.visualbasic, P5 8.0.0.0, P6 4333d6d8, P7 5e, P8 29a, P9 34ssps20bdj3nj0wmit5kamzhvglfzcc, P10 NIL. I also use Framework 2.0 Any ideas how can I get around this Hi, I'm very interested in that problem. Have you resolved it If yes what was the reason I also have the same errors in the EventLog: Event Type: Error Event Source: .NET Runtime ...Show All
Tomasz K. C# CodeVariableDeclarationStatement with array initialization
Hi there, I would like to generate the following using CodeDom object [] arguments = { Field1, Field2, Field3 }; I have arguments as procedure.Parameters collection. I think it must be like this: CodeVariableDeclarationStatement cd1 = new CodeVariableDeclarationStatement ( "object[]" , "arguments" , parameterListCodeExpression); I need hellp with correct code for parameterListCodeExpression. thanks in advance Be careful about CodeArgumentReferenceExpression . This class is used to reference arguments in the current function. If resultSet is not an argument that was passed to you then it won't be referenced by CARE . To add direction to any expression (al ...Show All
Rtalan FileSystemWatch firing wrong event!!!
Hi, I have experimeneted several problems with FileSystemWatcher which are explained on this forum, such as multiple events or events firing too soon. I'm monitoring 2 directories with 2 FileSystemWatcher objects for specific (and different) filenames, one of the directory is a sub of the other. I monitor both changed and created events. The problem is that when the file being monitored in the parent directory gets created the event handler associated to the file in the subdirectoy also gets fired. Note that in both cases I do set the IncludeSubdirectories attribute to false. Of course I can handle this by verifying the file name at the beginning of each event handler but still it is annoying (and caused me a fair bit of pain before I fig ...Show All
Thiago Moraes NGen very slow!
That's funny, I was just experimenting with ngen to see what kind of performance impact it has. And my very tiny test program with some vector structs runs twice as slow when ngen-ed! Here's the test program: using System; using System.Collections.Generic; using System.Text; namespace PerfTest { public struct Vector3D { public double x, y, z; //static Vector3D() { // Console.WriteLine("Static constructor!"); //} public Vector3D(double x, double y, double z) { this.x = x; this.y = y; this.z = z; } public Vector3D Add(Vector3D v) { return new Vector3D(x + v.x, y + v.y, z + v.z); } public static Vector3D Add(Vector3D u, Vector3D v) { return new ...Show All
Marcelroos Problem in setup project of a class library project
I have a class library which is globally installed on the system(GAC) I have a setup project in the solution. Problem is that when ever i change a single line in the class library and then compile the project. After it when ever i try to install the project I get the windows message for first removing/unistall the library from Add/remove program. I does n't like to get this dialogue.What can i do Try changing the version number. This library is refrenced in 12 to 15 projects so I have to hard code the version number of the library. I have hard coded the version number in assemblyinfo class and can't change it. What Can I do in setup project Is there any option there ...Show All
Duncan-Countrywide C2440 Error with SSPI
I have project dependent on "SSPI.h". However, during the conversion to the .NET 2.0 Framework, when I try to complie "SSPI.h", I get the following error. error C2440: '=' : cannot convert from '__const_Char_ptr' to 'wchar_t __pin *' Following is the piece of code which gives error: wchar_t __pin * pwszServerPrincipalName = NULL; if ((credential->SecurityPackage == Credential::Package::Kerberos) || (credential->SecurityPackage == Credential::Package::Negotiate)) pwszServerPrincipalName = PtrToStringChars(serverPrincipalName); I tried out by changing Project properties->C/C++->Language->Treat wchar_t as BuiltInType to "No (/Zc:wchar_t-)" and comiling again. But still the problem is there. Any sug ...Show All
Punpromk Finalization aborted when taking locks inside finalizers
Hi, its me and my finalizers again. In my quest to get rock solid and predictable shutdown behaviour I stumbled accross the bizarre phenomen that when I take locks inside a finalizer the whole finalization stuff during shutdown is cancelled. Is this the expected behaviour or did I miss something using System; using System.Collections.Generic; using System.Text; using System.Threading; using System.Runtime.ConstrainedExecution; namespace LocksInsideFinalizers { class Other : CriticalFinalizerObject { ~Other() { Console.WriteLine("~Other called"); } } class Program { string myName; public Program(string name) { myName = name; Thread t = new Thread(ThreadFunc); t.IsBackgroun ...Show All
Stuby085 Multiple elements in a configuration section
Hello All, I would like to know whether it is possible to have multiple configuration elements with the same name within a custom section. Changing the element name to say "operation1" instead of "operation" (see sample file below) seems to work but i would like to use the same element name. I think i have to set something like maxOccurs=unbounded but not sure where to do it inside my custom classes. I have already implemented custom classes inherting from ConfigurationSection,ConfigurationElement and ConfigurationElementCollection to implement the stuff below. Am i missing something Currently if i add multiple elements with the same name within the section i see the following error "The element <opera ...Show All
Alex Foygel Help documentation of Web applications
Hello all, I am using Sandcastle for only 2 days and it's use is to provide our framework with help documentation. I use the GUI-tool (Sandcastle Help File Builder). I don't find a way to document a web application. Because a website doens't build a dll and an xml (which names are equal). It's true you can find dll's in de temporary asp.net files - directory. But there aren't any XML files. If there is someone, who can help me, I would be very greatfull! Thanks! Greetings The solution that I've posted here, only works when you change the way you create a website... Does anybody know how to provide xml files with your dll's on an asp.net site, to create help documentation with sandcastle ...Show All
Kish_UNI Managing datatable rows
I have a datatable in my web application and I need to insert a new datarow into this datatable. The row must be added in a specified index and I need to shift all other rows (for example if I need to insert a row in 3th index position then all rows afther the 3th position must be shifted of one place so old 3th row will become the 4th row, old 4th will become 5th etc...). Is there an a method in the framework to do this operation Thank you Mirko I have tried it but the "InsertAt()" method give me an exception if try to save a new row into an index where another row is stored :( I'll try to do the procedure manually with two datatable and a cycle try DataT ...Show All
brian_j Low performance on ADODB .Save in Web Application
Here is the code example: rs_Recordset.Save(sr_Stream, ADODB.PersistFormatEnum.adPersistXML) Response.Write(sr_Stream.ReadText) The bottleneck is the .ReadText property. For 3000 records it takes about 15min locally. The exported XML is used in PivotTable so it has to be generated as adPersistXML. Data fitering is done on the query level, so caching won't help. Are there any suggestions on how to improve performance on that Thank you in advance... This is not an ADO.Net topic. I'm moving the thread to the native-code data access forum. ...Show All
Gurpreet Singh Gill new Thread questions
Cdelegate cDelegate = new Cdelegate ( ); ThreadStart trSt = new ThreadStart ( cDelegate.csvTOsql ); Thread trd = new Thread ( trSt, 5000 ); trd.Start ( ); I ran this code and it seems to be working fine, however, two things remain unclear. (1) Do I have to take any special steps to terminate the thread after work of the delegate is done. If so, how can I do it (2) I ran it a few times in debug. The delegate csvTOsql transfers some scv files (about 200 of them to SQLEXPRESS server. On the second run and that run only I got a runtime error message that I neglected to copy since I expected it to be repeated. It never came up again but I expect it to show up in the future. I will try to reproduce it from memory: Thread (perhaps, p ...Show All
Karl Seguin - MVP Get the Disk drive information in vb.net
I want to know the free space, used space in the particular drive of my hard disk by vb.net program. so can anyone help me in this issue sure. in .NET 2.0 there is a DriveInfo class in the System.IO namespace For Each curDrive as DriveInfo in My.Computer.FileSystem.Drives If curDrive.DriveType = DriveType.Fixed Then dim theFreeSpace as long = curDrive.AvailableFreeSpace MessageBox.Show(theFreeSpace.ToString()) End if Next You can of course get the name of the drive using the name property to check to see if it is the drive you are after does this help Thanks frined Its worked. I got an ...Show All
Janne_K calling a paramaterised stored procedure from visual c# 2005 express
Hi I am using visual C# 2005 Express I also have SQL Server 2005 express I created this procedure from within the C# IDE ALTER PROCEDURE dbo.test4 @id int AS SELECT P1_firstname + ' ' +P1_Surname as FullName FROM p1_names WHERE p1_id = @id RETURN As it will only return 1 row (P1_ID is an Identity) I dragged a text box onto a windows form, in addion to that VC added a box labled 'id' and a fill button. However when I run the program I put in a number I know is in the list, press fill & I get... Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. But before I parameteriase it it worked fine, with list boxes and datagrids. The C# is... ...Show All
