Posts by Jeterson Miranda Gomes • 672 points
46 posts
-
2
votes1
answer88
viewsQ: Extract parameters from an SQL query
In the following query in any SQL SELECT * FROM TABELA WHERE CAMPO1 = :PARAM1 AND CAMPO2 = :PARAM2 I need to get the names of these parameters, PARAM1 and PARAM2 and store them in a list or array.…
-
2
votes2
answers149
viewsA: File deletion with Fs not working
Use the unlinkSync to exclude: fs.unlinkSync(`./public/${results[0].photo}`); Or use the Promise fs.unlink(`./public/${results[0].photo}`).then(res => {}).catch(err => {})…
-
1
votes0
answers29
viewsQ: Trigger some kind of event when an application opens in c#
I need to stop working business users from opening many apps at the same time. For example, ABC.exe application can only be opened once on the computer (or 2x). So if you already have two instances…
-
2
votes2
answers619
viewsQ: It is possible to return a Observable<Boolean> from the get request
I need to check if the api is active. Basically I’m trying to check if the request status is 0; if so, I know the api is out of order. But I wanted to put this method in my service class and only…
-
1
votes1
answer68
viewsA: Unity 3D Command Solution
Basically you need a beacon to mark whether he’s crouching or not. private boolean agachado = false; public void keyPressEvent(object sender, KeyEventArgs e){ if(e.KeyCode == Keys.C){ if(agachado){…
c#answered Jeterson Miranda Gomes 672 -
2
votes2
answers358
viewsA: Trigger to Retrieve Last Record Inserted in PL-SQL Table
The variable :NEW and :OLD is already the table itself with the inserted and Deleted data respectively, it is not neecssário to pass the table: :NEW.TABELA.CAMPO Only :NEW.CAMPO, where :NEW already…
-
0
votes1
answer48
viewsA: Problems with JOIN and CONDITIONS - sql
When using function aggregation(sum, max, min, count) in consultation, you need a group by select e.Codigo, SUM(e.Qtd + t.Qtd), e.QtdLim from tbEstoque e join tbTransito t on t.Codigo = e.Codigo…
-
0
votes3
answers5148
viewsA: Return BD data using List/Arraylist - Java
To print data separated by ;, considering the data search of the database made by the colleague above After Voce searched the data from your database or another, E has the data in a collection in…
-
0
votes1
answer1710
viewsA: Problem with more than two router-outlet in the app
I put my Empresacomponent as Principalcomponent’s son and removed the outlet parameter from the Router, removed the name attribute from the <router-outlet></router-outlet>, and resolved.…
-
0
votes1
answer46
viewsA: How to call the value of a Subquery within another Subquery and they are in the same View
You can use your daily subselect from. For example: SELECT --esse é seu subselect download (SELECT COUNT(0) FROM `LICENCAS` WHERE (`LICENCAS`.`FK_PEDIDO` = `A`.`FK_PEDIDO`) AND tab.dias_ocorridos…
mysqlanswered Jeterson Miranda Gomes 672 -
0
votes1
answer1710
viewsQ: Problem with more than two router-outlet in the app
[...] <header> <a routerLink="/lista-empresa" href="javascript:;">Empresa</a> </header> [...] <main> <router-outlet name="conteudo"></router-outlet>…
-
-1
votes1
answer362
viewsQ: c3p0 generating many connections
Code that gets the connection InitialContext ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup("java:/comp/env/jdbc/oracledb"); Connection connection = ds.getConnection();…
-
1
votes0
answers347
viewsQ: Error initializing Datatable with jquery
Hello, I have a Datatable that will be fed with Javascript Source (data source) when opening the screen, I want it to be started "empty", without data. For some reason, it already starts…
-
0
votes1
answer70
viewsA: Printout from Microsoft.Office.Interop.word.dll only performs 1-page document printing
I managed to solve. The problem was that I was closing the document right after Printout then I changed the code to wait for the end of the print and then close the document:…
-
0
votes1
answer70
viewsQ: Printout from Microsoft.Office.Interop.word.dll only performs 1-page document printing
Good morning guys. I’m using the lib Microsof.Office.Interop.Word.dll to carry out the printing of a word document. When the document has only one page, the printing works normally. The problem is…
-
1
votes1
answer89
viewsA: Hashbytes with different value when selecting and writing with update
I found out personally: The problem was that my datatype in the database was varchar. Performing some tests I saw that the correct type that the hashbytes returns is varbinary. made the change and…
-
1
votes1
answer110
viewsA: Data is not saved in the database
I don’t work with JPA, but because of the description you gave of the behavior and your saving method. I think a commit is missing. If your connection is set to setAutoCommit(false). You have to…
-
1
votes1
answer89
viewsQ: Hashbytes with different value when selecting and writing with update
SELECT HASHBYTES('MD5','123') This select above returns me the following result: 0x202CB962AC59075B964B07152D234B70 But when I update the table using the same hashbytes UPDATE USUARIOSLOGADOS SET…
-
3
votes1
answer543
viewsA: Calculation in a Datagrid. C#
Go to the Event of Datagridview Endedit and calculate, that is, when finishing the edition of a cell performs some function. More so the less so: private void dgvTabela_CellEndEdit(object sender,…
c#answered Jeterson Miranda Gomes 672 -
0
votes2
answers92
viewsA: Data Import
In your Form Class Constructor do the BD query and arrow the employee code for the field. //construtor do form. public CadastroLogin(){ SetCodigoFuncionario(); } private SetCodigoFuncionario(){ try{…
-
0
votes2
answers124
viewsA: Static Datatable, how to load?
Next place the line that fills the combo after informing the values and display Member private void carrega_cb_pais() { comboBox5.ValueMember = "code"; comboBox5.DisplayMember = "descricao";…
-
0
votes3
answers4847
viewsA: INSERT inside a SELECT - SQL Server
Create a trial to do this, and there inside you will be able to validate via SELECT and with a IF decide whether to insert or not. CREATE PROCEDURE PROC_INSERE AS BEGIN DECLARE @IDTABELA INT SELECT…
-
0
votes1
answer438
viewsQ: Error while connecting to ftp using c#proxy
I have an application that connects to an ftp, but when trying to connect using proxy authentication I get an error. O servidor remoto retornou um erro(514). Proxy retornou um erro. This is the…
-
1
votes1
answer393
viewsQ: Save a field log only if it is Insert (Trigger SQL Server)
I have a Rigger that fires when it is Insert/update FOR UPDATE, INSERT I check if the field was changed with: if update (nome) --faça algo How do I know if I am entering a record in the table to…
-
2
votes1
answer108
viewsA: How to return an SQL with result?
I have an example of a similar situation I went through. Voce must use the left join: SELECT PERMISSAO.Codigo CODIGO, PERMISSAO.Descricao DESCRICAO, ISNULL(permissaoUsuario.acesso, 'N') ACESSO FROM…
-
1
votes1
answer66
viewsQ: BKP Sqlserver does not run when executed by a trigger(Trigger)
I have a trial that runs a bkp from my database. If I run it by Sqlserver the bkp is normally performed But when I call for a Rigger, another trial or application the bkp is not realized, the folder…
-
0
votes1
answer476
viewsQ: Return a CURSOR from a Sqlserver using dynamic sql (sp_executesql)
In the oracle I can do as follows : OPEN MY_CURSOR FOR 'SELECT * FROM MY_TABLE' How to get this result in Sqlsever? I want to return a cursor by mounting a dynamic sql in the Procedure. I’m…
-
0
votes3
answers726
viewsA: How to identify a key in Textbox?
In your Textbox Keydown event, do the following : if (e.KeyCode == Keys.Enter) { //executar alguma acao. }
-
2
votes1
answer1291
viewsA: Dynamic access column oracle cursor
I made a small example here that should clear the ideas ae. DECLARE VSQL VARCHAR2(4000); VARMAZNAR VARCHAR2(4000); VTEMP VARCHAR2(4000); BEGIN --SELECT PRINCIPAL FOR PRINCIPAL IN (SELECT * FROM…
-
1
votes1
answer1006
viewsQ: Use Java Project in another project
I have a web java project (a kind of framework) and I want to use it in my main project(the application), but I don’t want to generate a .jar. I want to use it directly within my project so that…
javaasked Jeterson Miranda Gomes 672 -
0
votes1
answer1179
viewsA: Query between different databases in SQL Server
I managed to solve, due to some records in the comic book WebAdiantamento are null and void, I couldn’t make the comparison, so I added a isnull in subquery and solved the problem.…
-
0
votes1
answer1179
viewsQ: Query between different databases in SQL Server
Given this query: SELECT PontoSecullum4.DBO.funcionarios.N_FOLHA, PontoSecullum4.DBO.funcionarios.NOME, PontoSecullum4.DBO.funcionarios.EMPRESA_ID, 1 [ORIGEM] FROM PontoSecullum4.DBO.funcionarios…
-
1
votes2
answers81
viewsA: Simple SQL query
Just to complement the solution of the friend there: You can also use the function isnull SELECT * FROM tabela WHERE id = isnull(@varid, id)
-
2
votes1
answer977
viewsQ: Error writing file stream
The flow was not writable You receive this exception when trying to change a file that is on Resource. Follows the code: var assembly = Assembly.GetExecutingAssembly(); Stream str =…
-
3
votes1
answer48
viewsA: Create a Three Table Viewer
It would be more like that the select of your View.. SELECT PEDIDO.ID_PEDIDO, CLIENTE.ID_CLIENTE, CLIENTE.NOME_CLIENTE, PRODUTO.ID_PRODUTO, PRODUTO.VALOR_PRODUTO FROM PEDIDO, CLIENTE, PRODUTO WHERE…
-
0
votes3
answers438
viewsA: Close in Transaction with Ibernate
Exception says your Session is already closed: Session was already closed I recommend doing a validation before closing Session, to Prevent it from trying to close one Session already closed: if…
-
1
votes2
answers561
viewsQ: Create header and logs dynamically based on a json
Good afternoon to you... I need to create a table where the rows and columns are created dynamically. For example, consider this JSON: {"employees":[ {"firstName":"John", "lastName":"Doe"},…
-
0
votes1
answer47
viewsA: How do I put a description under an image?
See this link helps you: The attribute alt of the img tag must meet: see the example of the link above: <img src="endereço da imagem" alt="texto sobre a imagem" width="300" height="228"…
htmlanswered Jeterson Miranda Gomes 672 -
2
votes2
answers4495
viewsA: How to disable a button and to activate it, click on another button?
In the constructor of your form class you put the button to start disabled. public Calculadora(){ InicializaComponent(); btnSomar.Enabled = false; //outros botoes que voce queira deixar…
-
1
votes2
answers316
viewsA: Insert record into bank inside a for using Hibernate
Apparently the only thing that could be giving this problem there and this variable duracaoRepeticao She’s really worth 12 ? printa ela na log para poder ver...
-
1
votes1
answer858
viewsA: Problem inserting records into Oracle
You’re trying to insert a VARCHAR in a field DATE convert to date using TO_DATE as the comment of Eduardo Almeida TO_DATE('19-Feb-2008', 'DD-Mon-YYYY')…
-
4
votes3
answers982
viewsA: How to verify encrypted passwords with user input passwords in the database?
I’ll use the following. I write the user password in hash form and when I will validate this password I will hash the user input and compare this input hash with what is stored in the database…
-
0
votes1
answer106
viewsA: How to do a SELECT pull Qtde or sql weight to a single column on the grid depending on registration?
If I understood your question and the following: You quoted depending on the registration so I guess there is some field informing the unit of this product. I don’t know what the structure of your…
-
1
votes4
answers739
viewsA: Is it possible to put an "IF" condition on media to Internet joins and other Where conditions in SQL Server?
You can use a CASE and bol_portfolio = CASE WHEN @eh_port = 1 or @eh_port = 0 THEN @eh_port ELSE bol_portfolio END When it’s 2 go to Else and will not consider your parameter.…
-
0
votes1
answer44
viewsA: Write to a csv file with JSP without overwriting what you already have
Read the file in a string, add the new content in that string and then save the string with the old and new content.
-
1
votes1
answer1270
viewsQ: Read file that is on Solution in C#
I created a file on Solution of my project. How do I read this file? He must stay in Solution because when compiling it should be packaged in the . exe.
c#asked Jeterson Miranda Gomes 672