Posts by igventurelli • 4,441 points
166 posts
-
1
votes1
answer945
viewsA: How to get an element id that has just been inserted - JAVA
Within a transaction, right after inserting into the bank and before carrying out the commit, you can do SELECT id FROM tabela WHERE ROWNUM = 1 ORDER BY id DESC (SQL for Oracle). This query will…
-
0
votes3
answers243
viewsA: List error with null reference in Java
If you want, you can remove all null entries from your lists and continue working normally without having to check input by input: suaLista.removeAll(Collections.singleton(null)); Original post…
javaanswered igventurelli 4,441 -
1
votes2
answers181
viewsA: Links in strip menu
As far as I know, natively you can’t make it a link in fact, but you can do by code for your application to open the browser with that URL. Ex:…
-
0
votes2
answers1053
viewsA: How to fill a list C#
To solve this problem you must use the class List<T>. The class List<T> is generic, where T is the kind you want your list to be. In your case, List<Email>. Take a look at this…
-
2
votes1
answer836
viewsA: Receive by Parameter and Manipulate a Generic Object LIST
The class List<T> is implemented in a generic way. Where T the class from which you want to create the list. For example, to use a list of teachers, your method should receive as a parameter a…
-
1
votes2
answers77
viewsA: Nullpointexception in the register method
In class FuncionarioDAO, in the method cadastrarFuncionarios, has that line: stm.setString(5, VerificacadoresEConrretores.converteparaSQL(funcionario.getDataCad())); In class FuncionarioController,…
-
0
votes2
answers1383
viewsA: Automatic click at a certain time
To run the event click you can call the method that represents this event. For example: public void button1_Click(Object sender, EventArgs e) { }. Regarding scheduling time, take a look on that…
c#answered igventurelli 4,441 -
0
votes2
answers1474
viewsA: Is it possible to do an INSERT and UPDATE in the same query in java?
This is independent of the programming language. As far as I know, the databases (relational, at least) do not accept to do more than one query at the same time (save Queries, but there is only to…
-
8
votes3
answers2170
viewsA: How to compare two List and delete repeated fields?
Assuming T is the type of your lists: foreach(T t in lista1) { if(lista2.Contains(t)) lista2.Remove(t); } EDIT: According to the documentation, there is no need to check if the item exists before…
-
3
votes2
answers1174
viewsA: How to do more than one select in the same query?
You can use subqueries. Behold: select c.*, f.nome_fabricante as nome_fabricante, temp_sql.nome_linha_camera from (select c.id_camera, c1.nome_linha_camera from cameras as c join cameras_linhas as…
-
0
votes1
answer46
viewsA: Database query, main class returns zero
Friend, the first object donation, its scope is within the while, the second is within another method, i.e., the line doacao.setChaveFk(numero); arrow the number only to the object inside the while…
-
0
votes1
answer86
viewsA: Parameters in Static attribute
JSF uses Controller getters and setters to transfer information from View to Controller. We don’t use getters and setters on statics (maybe getters.. hehe) This way, you should create some public…
-
-1
votes1
answer299
viewsA: Prevent database insertion with String " (with space in name)
Friendly talk! About the exceptions: I haven’t found anywhere the launch or capture of Exceptions.. Is it really implemented? Even though you’re being judged for the elegance of the code, I think…
-
0
votes1
answer2242
viewsQ: Visual Studio Express 2013 for Windows Desktop installation error
I tried to install VS Express 2013 for Windows Desktop on my notebook that had just been formatted and installed Windows 8. I received a message in the setup complaining of pre requirements. Before…
-
0
votes3
answers3702
viewsA: How to get the dynamically created Textbox value?
Opa! So.. You can make a foreach of Controls.. Like this: foreach (Control controle in this.Controls) { } Then you can sweep all the controls of your form. Makes a if (controle.GetType() ==…
-
1
votes4
answers4412
viewsA: How to set the data of a Datagrid to a Textbox in C#
I did that a little while ago.. The difference is I’d sweep the DataGridView and that’s not your problem, okay? From what I understand you want to click on a line and recover the value of this...…