Posts by Tiedt Tech • 2,427 points
88 posts
-
0
votes0
answers12
viewsQ: Oracle XE 18c database size limitation
According to official documentation from Oracle available in https://www.oracle.com/br/database/technologies/appdev/xe/faq.html has the limitations: What are the resource limits of Oracle Database…
-
0
votes0
answers12
viewsQ: SQL Server error in UPDATE column with Always Encrypted
I’m implementing in a bank SQL Server the Always Encrypted which serves to encrypt columns of a table. The process of creating the certificate, link it in a table/cokuna and use it in the SQL Server…
-
2
votes0
answers42
viewsQ: How to handle complex filters in Rest API requests?
In Rest Apis good practices recommend: GET - List data; POST - Think; PUT - Update data; DELETE - Erase data. Following good practices, to recover a list of data we should use GET and for filters we…
-
2
votes1
answer84
viewsA: Separate Columns in SQL Row Numbers
For this you can use the upivot. You can use PIVOT and UNPIVOT relational operators to change an expression with table value for another table. PIVOT rotates a expression with table value when…
-
1
votes2
answers790
viewsA: How to get max() and min() data in SQL?
The result is wrong because of the field type. You should use date or datetime instead of varchar. He brings the 31/12/2015 as the maximum value because the 3 is higher value. It sorts the text like…
-
0
votes3
answers1854
viewsA: SQL query to know the sales of a period (year), dividing by month and showing the total of each month and year
Here’s another SQL option. I don’t know if you need the result in rows or columns. Functioning I’ve separated the months, with case so each column stays a month, and at the end I created the column…
-
3
votes1
answer88
viewsA: Oracle SQL Function
Functional example. I tried to put in the http://sqlfiddle.com, but as it has function I could not. Tables create table TB_DISCIPLINA ( COD_DISCI number(10), DESCRICAO varchar2(255), CREDITOS…
-
0
votes1
answer92
viewsQ: Viewbag Life Cycle in C# MVC
I know the life cycle of ViewBag of C# MVC, is by request. Doubt If I set one ViewBag with the same name in several controllers, there is the possibility of the set information being read /…
-
0
votes1
answer54
viewsQ: Customize ASP.NET Identity
I still only use the FormsAuthentication but I’m looking to migrate to the ASP.NET Identity in MVC. In my current projects, I don’t work with roles of FormsAuthentication, and yes by permission of…
-
2
votes3
answers676
viewsA: Factor of a number chosen by the user
In a quick search on the internet, there are 3 ways to calculate a factorial, which are: Using Loop using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace…
-
3
votes1
answer302
viewsQ: C# and Entity Framework with Foreignkey between classes
People in my projects .Net MVC use the structure below. My projects, are with Entity Framework. The briefcase Entidades, are the classes I use in DbContext. Detailing the problem I have the class…
-
3
votes2
answers378
viewsA: Get the invoiced amount from the previous month
One solution to your problem is to make a column with the sub-select, with the where and the data you need. The full SQL is in http://sqlfiddle.com/#! 4/610c68/13 Table creation CREATE TABLE UBER (…
-
0
votes0
answers68
viewsQ: Entity Framework 6 catch attributes in Savechanges
I’m using the Entity Framework 6 with Oracle. The database is of a legacy system, I intend to set in hand the primary keys of the records. To make life easier, I want to take SaveChanges of…
-
0
votes1
answer544
viewsA: Subquery in Oracle SQL
I changed your logic a little to get the result. I imagine you can have client without invoices, so the basis of your SQL is the table of CLIENTE. From it I made a left join to bring the invoices in…
-
2
votes1
answer50
viewsA: Return text sql to model in the Entity framework
Simple example of using Entity Framework (EF) and where dynamic. Context public class Conexao : DbContext { public Conexao() : base("Conexao") { Database.SetInitializer<Conexao>(null); }…
-
1
votes4
answers1185
viewsA: Change only the day of registration
You can update the data by update yes. You have to transform the date to text, adjust the day and transform the value to date again. I know this way, if I have others, I will learn. Test with SELECT…
-
1
votes0
answers1617
viewsQ: C# Httpwebrequest send Multipart/form-data in POST
I need to send one POST using HttpWebRequest, with the header Content-Type=multipart/form-data and Accept=multipart/form-data, and the data in Body. My routine below, I use it smoothly doing POST,…
-
2
votes2
answers693
viewsA: Find phone numbers inside a txt file
To validate you can use Regex. I made a simple example in https://dotnetfiddle.net/VAsL7a. Testing Regex Online http://regexstorm.net/tester In Pattern place: \(..\)[0-9]{3,5}-[0-9]{4} In Input put:…
c#answered Tiedt Tech 2,427 -
1
votes1
answer132
viewsQ: SQL command blocking controller requests in C# MVC
I am implementing in a C# MVC project, a routine to run the database Store. I’m having trouble that when I start doing the Store, other requests controllers are locked, waiting for SQL to finish.…
-
3
votes5
answers1602
viewsA: Change return /Date(1386295200000)/ to date format
I believe you are making a Json call and have a date field, just like the Json below: { "rows":[ { "UsuarioConviteID":1, "Email":"[email protected]", "Controle":"Aceito",…
-
1
votes1
answer67
viewsA: Getting category of a table in Mysql
Only necessary to group by field categoria SQL Search $consulta = mysql_query('select categoria from produtos group by categoria order by categoria');…
-
3
votes3
answers479
viewsA: Complex SQL with Mysql
I made generic SQL: select 'Total Estudantes' as Resultado, count(*) as Total from ESTUDANTES_IDENTIFICACAO union select CONCAT('Sexo ', b.sexo), count(*) from ESTUDANTES_IDENTIFICACAO a inner join…
mysqlanswered Tiedt Tech 2,427 -
1
votes2
answers74
viewsA: VIEW and JOIN, return the product, and the value with the latest date!
As the need was to fetch the price of the product with the highest date, it is only to make a sub-select that looks for the highest date in the table produto_preco and filter the field data. Example…
-
1
votes1
answer98
viewsA: ORACLE SQL - Sort by sum
I believe the SQL you passed is incomplete. So in the example below, I created a new column with the "value" of the customer’s invoice, with the name vlr_fat_cli. SQL SELECT SUM(vlr_fat_cli)…
-
5
votes2
answers5935
viewsA: Is there any clause similar to LIMIT in PL/SQL
The column ROWNUM, Oracle returns the line number inside the search result. The number is assigned according to the order in which the rows are removed from the/sql table. This order is defined…
-
1
votes2
answers1848
viewsA: Treat division by zero
Putting a Try / catch would not be the solution? public function teste() { $conta = "0/(0+0+0)"; try { eval('$result = (' . $conta . ');'); echo $result; } catch(Exception $e) { echo 0; } }…
-
1
votes1
answer146
viewsA: Set Value Default @Html.Dropdownlistfor via Json - ASP.NET MVC5
To set the Dropdownlist you have to inform that the record is selected. In the source below, change the regraParaSelecionar by its logic to validate the employee who was selected.…
-
1
votes0
answers229
viewsQ: LCK_M_IX in SQL Server database
Guys, I have two distinct client bases in SQL Server 2008, and both using the same system, which uses BDE for connection. I have my own app Scripter to make SQL queries in databases. Problem On both…
-
0
votes1
answer124
viewsQ: Validate attempted fraud when editing record with C# MVC
In my applications was leaves the entity ID inside HTML being a hidden object. Example: @Html.HiddenFor(m => m.EntidadeID) But, I identified that I can edit HTML easily and in POST I can receive…
-
1
votes1
answer108
viewsQ: Lib dependencies in C#?
I’m making a C# lib to use in my projects and not always have to rewrite. but as I do with Lib dependencies? Example: I made a lib to use Google Drive and has the name lib.GoogleDrive but you need…
-
0
votes4
answers64
viewsA: What practice is recommended to check if jQuery’s Ajax function is present and is recognized by the browser, does anyone know?
I got the code on http://programmerguru.com/ajax-tutorial/browser-support/ <script type="text/javascript"> var xmlhttp; function checkAJAXSupport() { if (window.XMLHttpRequest) { // Mozilla,…
-
1
votes1
answer482
viewsA: How to order a group in the mysql query?
Although I think your SQL does not run, for your need, does B.id_emissao desc. SQL full select * from base_rating as B JOIN historico_rating as H on B.id = H.id_base_rating JOIN escala_rating as E…
-
3
votes3
answers78
viewsA: Return Most recent date per Column?
If you always want the items of the last purchase do so: select * from MERCADO where NOME_MERCADO like 'extra' and DATA_COMPRA = ( select max(DATA_COMPRA) from MERCADO where NOME_MERCADO like…
mysqlanswered Tiedt Tech 2,427 -
3
votes1
answer257
viewsQ: What is GUID for Visual Studio projects
I have a "base" project in C# MVC (login, access control and related), to replicate in other projects, which consists of copying the fonts and sometimes renaming the project. Do I have to change the…
-
0
votes0
answers147
viewsQ: Problems with PDF file
I am showing a PDF file directly in the browser. In Google Chrome, it works perfectly, but if you use Firefox, the PDF is as shown below. Did you have to put some extra config for Firefox? The PDF…
-
1
votes2
answers120
viewsQ: C# MVC how statements work
I have the code below, and to call the Session that stores the user data, only once I want to put it in the controller statement. Doubt The variable usuarioLogado is by request or it may happen that…
-
2
votes3
answers3159
viewsQ: Add SOAP Header to SOAP C#
I’m trying to add a header customized in one service SOAP using C#. I’ve searched everything and I can’t find a solution that works. I’m adding the service by Web References of C#. I’ve tried to do…
-
3
votes1
answer441
viewsQ: Generic Dbcontext Dbset Method with Entity Framework
I have an application in C# using Entity Framework. All of mine DbSet of DbContext, I extend them to have a default search for the grid, below example of the method. public static GridDTO…
-
1
votes2
answers326
viewsA: Vector receives method return
Adjust your code and put it running on: https://dotnetfiddle.net/ADIUxT
-
1
votes2
answers515
viewsA: Parameter query string Asp.net MVC
You can’t block the URL. In this case, you have to do the control within your Action. If the logged-in user is the 1 (by Session, cookie or any form of control you have), and try to access the 2,…
-
3
votes2
answers539
viewsA: Context Dispose should be used in ASP.NET MVC?
In MVC you can use it like this, which is the way I see it most in CRUD projects public ActionResult Index() { using (var db = new Contexto()) { return View(db.Produtos.ToList()); } } Remembering…
-
1
votes2
answers1341
viewsA: Java coupon printing
The printing of coupons depends on various factors and state where the sale is made, I will try to explain in general. The coupon can be 3 types: Coupon Normal NFC-e, Electronic Consumption Invoice…
javaanswered Tiedt Tech 2,427 -
0
votes2
answers897
viewsQ: Webservice in C# with 404 error
I’m doing maintenance on a C Project, which has Webservices. I created a new service and ran the program, it works as images below, but calling the method gives error 404. This is normal behavior?…
-
6
votes0
answers1142
viewsQ: Signing Nfs-e in C# generates error Poorly formed Reference Element
out of nowhere my code in C# stopped signing the Nfs-e of Curitiba. In the code line below, gives the error: signedXml.ComputeSignature(); Errro Elemento Reference mal formado Does anyone know if it…
-
0
votes1
answer1329
viewsQ: Error publishing C# MVC project, Could not load file or Assembly 'System.Web.Http.Webhost
I have a C# MVC project, that running in Visual Studio 2013, works, but when I go up to the server gives this error: Could not load file or Assembly 'System.Web.Http.Webhost, Version=4.0.0.0,…
-
5
votes1
answer1843
viewsQ: Tempdata C# doubt with MVC
I know that the TempData has its "life" maintained until it is used in the View. However, if I do it on two different controllers, the same one identified from the TempData, I’m killing and about…
-
3
votes2
answers108
viewsQ: Memory Leak in Xmlserializer
I have the code below. How the method is static and the XmlSerializer does not implement the Dispose, at each call of the method, the system stacks in memory or the GC (Garbage Collector) can clear…
-
2
votes1
answer135
viewsQ: Problem with Viewbag and Viewdata for Breadcrumb Creation
I need to return from my controller to my project view data to assemble the breadcrumb (structured navigation). My problem is: If I send by Viewbag or Viewdata or Tempdata, and the user is using two…
-
3
votes2
answers710
viewsQ: Webservices with C#, make-up
I need to create a Webservice to export products. Creating Webservico is fine, but depending on the client, I will have to change the name of the elements. Example, Product Code element: Generic…
-
4
votes1
answer1099
viewsA: Get Data from Webservice in C#Action
From what I researched, the correct term of what I wanted was mock, which is something to simulate a Webservice. My problem was getting what my Webserver client sends to the server. Searching the…