Posts by israel3D • 169 points
14 posts
-
4
votes1
answer2980
viewsQ: C# Console Application. Read Json File
I have a Json file and it always gives error when I try to read it. I believe because it is an array within another array and I cannot read. Json: { "map": [ ["S", "S", "S", "S"], ["S", "S", "C",…
-
1
votes2
answers1338
viewsQ: T SQL Merge Two Lines in One
I have a common id (103307) and would like to join two lines in one. From image 1 and leave as image 2. It is possible?…
-
0
votes1
answer78
viewsA: Treat date correctly
You can treat the date as follows: function dataAtualFormatada(){ var data = new Date(); var dia = data.getDate(); if (dia.toString().length == 1) dia = "0"+dia; var mes = data.getMonth()+1; if…
-
0
votes4
answers3472
viewsA: Replace special characters and uppercase letters
Thus uses substrig/replace: $('.mirror').on('keyup', function() { var str = $(this).val(); str = str.replace(".", ""); str = str.replace(",", ""); //Tu adicionas todos os caracteres que tu queres…
-
0
votes2
answers619
viewsA: Stored Procedure for log data insertion
CREATE PROCEDURE [dbo].[sp_LogUsuario] ( @id int, @data int ) AS BEGIN --------- -- LOG -- --------- DECLARE @txtransacao VARCHAR(1000) = '@data=' + CONVERT(VARCHAR(200), ISNULL(GETDATE(), '')) +…
-
0
votes2
answers907
viewsA: Mount Stored Procedure Dynamic Query in SQL Server
Use IIF for these quick validations USE [MarcenariaDigital] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PRO insira o código aqui`insira o código aqui`CEDURE [dbo].[ps_precificacao] --…
-
1
votes5
answers25936
viewsA: How to pass a list of values to a Stored Procedure?
Send everything in a Varchar and then run the query CREATE PROCEDURE pr_lista_produtos ( @Ids VARCHAR(500) ) AS DECLARE @query VARCHAR(1000) SELECT @query = 'SELECT nome FROM produto ' SELECT @query…
-
1
votes1
answer1150
viewsA: C# MVC - Error after Publish on VS015. 404 Not Found
Well, actually I solved the problem. I just didn’t know how to run the ASP.NET program with a "Publish" on the "File System". I used the program "Webmatrix" to be able to run it and it worked very…
-
2
votes1
answer1150
viewsQ: C# MVC - Error after Publish on VS015. 404 Not Found
I did a "Publish" by VS2015 of the Web MVC type, but in the "Publish Method" I put "File System". The problem is that I published it on IIS and run the views, but when I click on the buttons it…
-
3
votes5
answers1923
viewsQ: Is it possible to update the first 100 lines in sql(server)?
UPDATE tbl_venda SET produto=1 WHERE produto=3 The problem is that there are more than 10,000 sales lines and the pc hangs. I wish it was possible to do 100 to 100, 500 to 500, so it doesn’t get…
-
1
votes1
answer837
viewsA: How to return output varchar from a precedent in c#?
Grateful for everyone’s help, but I was able to solve the problem: It was precisely because I put "(new Sqlparameter)" before, when passing the output parameter. It was as follows: public static…
-
1
votes1
answer837
viewsQ: How to return output varchar from a precedent in c#?
Error that appears: An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll but was not handled in user code Additional information: Error converting data type varchar…
-
0
votes1
answer144
viewsA: How to convert data to string from JSON? (Javascript MVC C#)
Thanks for the help, but I managed to fix it. I used the following code: jsondata = function (i) { var jsonDate = "/Date(1245398693390)/"; //dados[i].datadenascimento; var re = /-?\d+/; var m =…
-
1
votes1
answer144
viewsQ: How to convert data to string from JSON? (Javascript MVC C#)
The data looks like this: Date(-4735141200000) for me: function (dados) { console.log(dados); var len = dados.length; var txt = ""; var toDate; if (len > 0) { for (var i = 0; i < len; i++) {…