Posts by Wagner DosAnjos • 441 points
8 posts
-
5
votes2
answers174
viewsA: What SQL server command to list the user’s transaction Isolation level
There is a sp_configure that shows the Server Configuration Options. For example: exec sp_configure Output example name minimum maximum config_value run_value -----------------------------------…
-
0
votes2
answers878
viewsA: How to update Chart automatically every 60 seconds?
Move the following method statements to the class. Most likely objects are being discarded before the timer run, and moving them to the class will prevent this from happening. Private CArea As…
-
1
votes4
answers298
viewsA: How to implement an Objectset wrapper that works with Linqtoentities?
Extension Methods were designed exactly for this type of problem, where it is not possible or desirable to change the base classes. I believe this would be a better solution to your problem rather…
-
1
votes4
answers1141
viewsA: How to simulate "tail recursion" in C#?
In this case the only guaranteed way not to cause a StackOverflow would be to use a non-rerecursive algorithm. For example: static long Fatorial(int n) { long r = 1; for (; n > 1; n--) { r *= n;…
-
4
votes9
answers2644
viewsA: Best practice for creating if
It is worth mentioning one more option that escaped in the examples presented. Here using the ternary operator. string mensagem = exibirAdeus ? "Adeus" : "OI";
-
13
votes5
answers29661
viewsA: How do I know if a column exists in an SQL Server table?
To system view INFORMATION_SCHEMA.COLUMNS is specific to each bank. Add the name of the bank to ensure that you are checking in the correct bank. Depending on the collation bank, another possible…
-
1
votes2
answers1066
viewsA: How to change the URL that consumes a Webservice?
Try the following: MeuWS objColetar = new MeuWS(); objColetar.Endpoint.Address = new System.ServiceModel.EndpointAddress(novoIP); // por exemplo, http://129.135.145.177:8080…
-
6
votes2
answers408
viewsA: What is the simplest way to recover certain elements of an XML with Linq?
Try the following: var s = @"<clientes> <cliente> <documentos/> <livros> <livro nome=""Nome1""/> <livro nome=""Nome2""/> </livros> </cliente>…