Posts by Ismael • 4,781 points
138 posts
-
2
votes1
answer71
viewsA: getelementsbytagname returning zero
Failed to inform the namespace respective to the node to be read. NodeList nodeList = doc.getElementsByTagName("http://schemas.xmlsoap.org/soap/envelope/","Envelope");…
-
2
votes2
answers78
viewsA: Convert SQL to LINQ C#
The conversion may be as follows:: var sitAcomp = (from a in SITUACAO_ACOMPANHAMENTO where a.ST_Sit_Acomp == 'A' select a).ToList(); var resultado = (from a in contexto.ACOMPANHAMENTOes from pa in…
-
2
votes1
answer111
viewsA: Automatic view of a selected Row
If your datagridview is using a BindingSource, you can use the index of row found by your search on the property Position. (Add this line after finding the record) Automatically the focus will be…
-
2
votes1
answer100
viewsA: Comparison of database dates with system date
From what I understand, you want the bank value for the c#, right? Then follows a code illustrating how to return from the bank the sum of all products of the month returned by the system. string…
-
5
votes1
answer92
viewsA: Where to remove this warning from the visual studio?
You have already disabled this option Enable Diagnostic Tools while debugging? [Update] Requires VS restart.…
visual-studio-2015answered Ismael 4,781 -
3
votes2
answers1251
viewsA: WPF C# String Format
Have you tried other number formatting media? See more examples. <DataGridTextColumn Header="Valor" Binding="{Binding OperacaoValor, StringFormat={}{0:#,#.00}}" IsReadOnly="True">…
-
1
votes2
answers1381
viewsA: How to create a Rigger to save updates from two tables?
I will post the answer with Trigger (simplified). As José Diz said, it is not possible to shoot simultaneously in a Rigger by two different tables. You must create a Rigger in each table.…
-
2
votes1
answer315
viewsA: Read JPEG image, convert it to PDF and save to disk - Visual Basic 6
The answer to follow comes from the source Macoratti. I copied it in its entirety to answer the author of the question, even if the link goes out. public void ImagensParaPDF(string…
-
3
votes4
answers479
viewsA: Remove object from an Arraylist
You can try adding the Tolist foreach (cadastro cad in listVagas.ToList()) { if(cad.getBox() == Convert.ToInt32(consulta_box.Text)) { listVagas.Remove(cadOBj); } } WHY IT WORKS Simply the ToList…
-
5
votes2
answers82
viewsA: To obtain number of elements depending on the maximum number of elements per groups
Based on (Bacco) response to question, I set up a generator to repeat the Aquarium as per the id_especime, see: SELECT A.NOME 'AQUARIO' FROM (SELECT (D1+D2*10+d3*100)+1 AS GERADOR FROM (SELECT 0 AS…
-
3
votes1
answer72
viewsA: How does Backgroundworker e.error work?
Your code is right, the point is that in mode Debug is first launched (stop point) into the new throw to precisely check and make other implementations/ corrections. If you use the mode Release,…
-
0
votes1
answer104
viewsA: How to block a file temporarily?
Try it this way (I added a check in case it is already open) OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.ShowDialog(); string filePath = openFileDialog.FileName; if…
-
2
votes2
answers351
viewsA: progressbar reaches maximum value but visually does not fill c#
Move the increment line to after condition. private void SplashTimer_Tick(object sender, EventArgs e) { //if (Efect) //{ // this.Opacity -= 0.01D; //} if (pgrBar.Value == 100) { //Efect = false;…
-
3
votes4
answers343
viewsQ: Why not always use Optimize Code?
In Visual Studio there is the option Optimize Code which has the function of creating optimizations performed by the compiler to make your output file smaller, faster and more efficient. Why can’t I…
-
1
votes2
answers49
viewsA: Filename coming from a txt and files. Is there a difference in comparison?
Precisely for this case, use the Except: var busca = listaCommiter.Except(listaFarm); He will return in quest, all of listaCommiter that does not exist in the listaFarm.…
-
1
votes1
answer375
viewsA: Usercontrol x Form - Cancel screen event after UC validation
The Event Control.Validated will only be called after losing focus. Your code only works because you always focus back on control textbox after the event of validating, however, when activating the…
-
1
votes1
answer115
viewsA: ELK + REDIS - Duplicating data
Duplicate log is not the ghost log record as with SCALA server? "An alternative solution to avoid duplicate log records after logstash restart is to set the sincedb_path parameter in the file…
-
2
votes2
answers1097
viewsA: Excel vba - Httprequest GET
I simulated here with your same code and it worked correctly. Even when you change the value of the parameter to true displayed the same error. For me, the "Server Name or Address cannot be solved"…
-
4
votes2
answers1684
views -
6
votes1
answer4952
viewsQ: How to update a datagridview automatically?
I created an application that will display the data of a particular view in a control datagridview. The entire application is already ready: the data upload, the update button and also the events…
-
2
votes1
answer164
viewsA: Error while performing connection test in Visual Studio
Answer of the author of the pesgunta: i can fix, I created a connection string and it worked . I want to thank you anyway. - wladyband
-
1
votes1
answer65
viewsA: Resize Multidimensional/Associative Array from a Resultset
The command Redim does not allow initial value assignment. The message Expected end of statement informed in error indicates that the end of the statement in command was expected Redim after the…
-
2
votes1
answer58
viewsA: Doubt SQL tables
It won’t make any mistakes. The method that will be assumed is 1:1 if you do not create FK_ID in table 2 by relating it to table 1. However, if you are creating table 2 for normalization, you should…
-
2
votes1
answer439
viewsA: Add grid data to database
You can try with the example below. See that I use a insert normally and the food with the data positioned on the grid. if (dataGridView1.CurrentRow == null) return; SqlConnectionStringBuilder…
-
6
votes4
answers15280
viewsA: Can you create an array in SQL Server?
You can try with the example below select STUFF((select ', ' + descricao from PRODUTOS FOR xml PATH ('')) , 1, 1, '') STUFF FOR XML…
sql-serveranswered Ismael 4,781 -
3
votes2
answers9692
viewsA: Entity Framework Query with Inner Join and Where
Utilize ToList() instead of ToString() or even withdraw this method. The LINQ returns a IEnumerable / IQueryable, and not a string. Introduction to LINQ queries (C#) var aluno = (from al in…
-
1
votes1
answer70
viewsA: Error trying to save register in bank
Your class Habilidade has two builders, as you stated, however, in the Save method, you requested habilidade only by the default constructor, who in this case did not assign any value to the class…
-
4
votes3
answers607
viewsA: check query in 2 tables at the same time with mysql
You can do it like this: select * from cadastros a where not exists(select * from funcionario b where a.id = b.id_cadastro) or so: select * from cadastros a left join funcionario b on b.id_cadastro…
-
4
votes1
answer145
viewsQ: Generate XML content HASH in SQL
Is there a way to generate the hash of a XML beyond the function master.sys.fn_repl_hash_binary? Currently this is my implementation, however, I do not know if it is the only way to do. --Preparação…
-
2
votes1
answer882
viewsA: Direct printing in Java
Enter a different type for your Flavor for compatibility DocFlavor docFlavor = DocFlavor.INPUT_STREAM.AUTOSENSE; You have created an array with the printers but no printer is available at position 5…
-
4
votes3
answers269
viewsA: How to format the name of an item in a listbox?
So that the name of the selected files are listed in control list, implemented the code below. Note that the MultiSelect allows the return of a collection that can be obtained by FileNames and…
-
4
votes3
answers342
viewsA: How and where to implement business rules in the Entity Framework?
For example, before entering or changing your record, you could call a method (boolean) with the necessary rules. The rules could be defined in the database itself through triggers or even stored…
-
2
votes1
answer245
viewsA: Select to bring specific id record
Check the syntax of where because you are filtering the hosting by the consumption code, and not the consumption related hosting. Exemplifying: In your code, H.codHospedagem relates to…
-
4
votes1
answer686
viewsA: Error: Object Reference not set to an instance of an Object
You haven’t initialized the virtual list in the class constructor and set the list type. public class Student { public Student() { Subjects = new List<Subject>(); } public int StudentId { get;…
-
2
votes1
answer310
viewsA: Reading of Excel file
I’ve remade your example with the JET driver, if you can use it. string cnnString = String.Format(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=""Excel 8.0;HDR=YES;""",…
-
1
votes1
answer1377
viewsA: Linq with 2 different context using Inner Join
follows example that I set up based on your scenario and got the list correctly. List<Funcionarios> Funcionarios = new List<Funcionarios>(); using (var dbMega = new Entities_Exemplo_A())…
-
1
votes2
answers502
viewsA: Object Reference not set to an instance of an Object
The mentioned link deals with intermittent errors in ADO and ADO MD. These problems occur because the technology compatible with the Framework . NET is the technology ADO.NET. The text highlights:…
-
2
votes1
answer1438
viewsA: Generate header when exporting data to excel
I’ll show you two different ways. This question happened to me and I solved it with mode 1. After your question, I went in search of a new way and implemented method 2 in my application. 1) The…