Posts by Aprendiz • 787 points
43 posts
-
0
votes1
answer28
viewsQ: Doubt in the use of Dateformat in linked server (Linked)
I have the following situation. Executing that script: SELECT CONVERT(DATETIME, CONVERT(VARCHAR, 12) + '/' + CONVERT(VARCHAR, 31) + '/' + CONVERT(VARCHAR, 1900) + ' ' + CONVERT(VARCHAR, 0) + ':' +…
-
2
votes2
answers90
viewsQ: Is there a possibility of versioning files other than code?
Like versioning Ireport files or other tool ? 'Cause I work with a ERP and I need to find a way to edit the files I edit.
versioningasked Aprendiz 787 -
0
votes0
answers81
viewsQ: Integration between two databases
I have an idea to integrate two databases, at one point I have the database Postgressql with system A and on the other side a bank Firebird in system B. For example: I recorded a client on system A…
-
1
votes1
answer146
viewsQ: Select does not return broken value
I have the following command: SELECT CAST(450/4 AS DECIMAL(15,2)) Return: 911 where the right one would be 112.5 Because of that? NOTE: My SCRIPT is in a precedent, but roughly my problem is in this…
-
0
votes2
answers68
viewsQ: Error 102 in Openquery
I’m making this mistake: Incorrect syntax next to@SQL_LINKED.. Error 102. SQLSTATE 42000. Severity 15. Msgstate 1. Line 78. When trying to run this script : SET @SQL_LINKED = 'SELECT CAST(v.produto…
-
3
votes1
answer186
viewsQ: Formula within a Field
In a field I have the value of a formula ((B/2)+ C), where the value B and C comes from other fields, how can I exchange the values of the letters for their real values and calculate the formula? I…
-
0
votes1
answer682
viewsQ: Modularize Nodejs Connection with Postgresql
I’m having trouble creating a module on nodejs to export my connection to PostgreSQL. I couldn’t understand why according to code does not work as I would like to export connect. Code 1 . var pg =…
-
0
votes1
answer1088
viewsQ: Connection between two DBMS Sql Server
Is there any way beyond Linked to connect two DBMS ? Problem: I need to use the tables of another bank that is on another server with the SQL SERVER installed. My current server is also SQL Server;…
-
2
votes1
answer214
viewsQ: Linked SQL Server and Firebird: Error 'Must declare the scalar variable'
I made a Linked of my SQLSERVER with the FIREBIRD. But when I pass a variable inside the query to return the amount of record I get the error: Message 137, Level 15, Status 1, Line 1 Must declare…
-
0
votes0
answers162
viewsQ: Add Font to Bundleconfig
I’m looking to put a source who is in a link, tried these two ways and none works, simply my page does not load the source. It follows codes: First form: var linkFont =…
-
0
votes1
answer65
viewsQ: Add Action and Controller to Beginform’s Htmlhelper with T4
I need to add to my template in T4 the value of action and of controller, but I can’t understand how I can pass their names. Following example: CREATE.cs.T4 @using (Html.BeginForm("Create",…
-
1
votes1
answer61
viewsQ: How to organize the Theme Directory
I have a question about how to split the files CSS and Javascript in my project directory ASP.NET I got the theme METRONIC, the theme directory has a folder where all the files are css and js call…
-
0
votes4
answers488
viewsQ: How to treat this Nullreferenceexception
I don’t understand why I’m getting one NullReferenceException, in that beautiful code: pessoaJuridica.InscricaoEstadual = viewmodel.PessoaJuridica.InscricaoEstadual; What I’m doing wrong? Follows…
-
2
votes1
answer1635
viewsQ: Return Controller List to View
I have a controller where the information of the ModelState, store errors in a list. I would like to take this list and return to my view. But I’m a beginner and I’m not getting to understand how I…
-
0
votes3
answers764
viewsA: Error In Modelstate Validation
I used to foreach and it worked that way: var ListaErros = new List<string>(); foreach (var values in ModelState.Values) { foreach (var erros in values.Errors) {…
-
0
votes3
answers764
viewsQ: Error In Modelstate Validation
I am wanting to return the validation errors of my model. Only I get an error message when I try to register. System.Linq.Enumerable+Whereenumerableiterator`1[System.Web.Mvc.Modelerrorcollection]…
-
2
votes1
answer222
viewsQ: CASE WITH IN does not work
I’m willing to do this search below: DECLARE @codccu VARCHAR(10); SET @CodCcu = '63' SELECT E.codepi, E.numcad, Max(E.datent) AS ENTREGA, Max(E.datent) + P.diaval AS VALIDADE, CASE WHEN…
-
0
votes1
answer72
viewsA: Search for values with priorities
I managed to solve the above problem by creating a table temporária and then putting the script in a procedure. Follows the script: DECLARE @total INT; SELECT E.NUMCAD , E.CODEPI, MAX(E.DATENT) AS…
-
6
votes1
answer1069
viewsQ: Difference between temporary table and variable table type
In the Sqlserver there are temporary and variable table type resources. What would be the most advantageous or the best option to put in a Procedure which inserts the query that was returned from a…
-
0
votes1
answer72
viewsQ: Search for values with priorities
I’m looking for a search and I’m not finding the right logic to filter the results I want. I have a table with all the expiration registrations of certain equipment. My problem is related here: The…
-
0
votes2
answers99
viewsA: Trigger for table optimization
Your problem is on the line DECLARE @qtd int = 0; cannot set the value this way, you need to use the SET Thus: DECLARE @qtd int; DECLARE @MAXDATE DATE; DECLARE @DATAATUAL DATE; SET @qtd = 0; In…
-
1
votes2
answers520
viewsA: Give a select to return the exclusive values
Follow the script, try to use it like this SELECT CHAVE, STATUS FROM teste WHERE status = 'DIFERENTE' AND CHAVE NOT IN (SELECT CHAVE FROM teste WHERE STATUS = 'DIFERENCIADO') Upshot: DIFFERENT…
-
4
votes1
answer359
viewsQ: Using EF and Dapper in the same project
I’m making a simple insert of a user class, it is taking almost 10 seconds to record the information. So I tried to find other solutions to solve my performance problem and found the Dapper. My…
-
4
votes2
answers544
viewsQ: Map Enum with search conditions
I have a class that makes the search conditions as follows: public enum EnumCondicao { [Display(Name = "Igual")] Igual, [Display(Name = "Diferente")] Diferente, [Display(Name = "Maior")] Maior,…
-
1
votes2
answers212
viewsA: Read column values - C#
This error happens due to return being nullo and you try to record in a whole, so returns that error. To solve can use the ISNULL sql server, thus: SELECT ISNULL(Code_Article,0) FROM ArticleBarCode…
-
1
votes2
answers753
viewsA: UNION with 2 DATABASES, SQL
You should check if the user you are using on your connection has read permission in the other database. In the SELECT shall use the name of the other bank before the table reference. Example:…
-
0
votes1
answer63
viewsA: Adding up hierarchy points
To Add use the SQL function SUM(), but to use it you need to group your record with GROUP BY passing all fields you want to search, do not use c.*, just take the fields that are really needed for…
-
1
votes2
answers244
viewsA: query sql does not work
Your problem is not in the select of your database but rather in the way you are reading your txt file. Use the function trim($arquivo) php to clear whitespace. Due to the storage of blank spaces…
-
6
votes3
answers625
viewsQ: How to treat Nullreferenceexception with Lambda
I have a class to search for DisplayName of my entities, where I pass the entity and class returns a list with the real values and name of each attribute of the entity. My problem itself is when I…
-
1
votes2
answers350
viewsA: Calculate total sales of the Java store
You need to assign the totalV with the Total products. No need to put other IF, while will only loop until it is different from FIM Try it that way: while (!produto.equals("Fim")) {…
-
6
votes1
answer230
viewsQ: Filter Postgresql Information on Windows Forms screen using Entity Framework
Is there any way to search for the information in postgresql by nickname? But without using alias, only in the field register in the table I already enter the real name for the field? Example:…
-
2
votes1
answer148
viewsQ: Development without EF ORM
It is valid the development without ORM, because today I want to develop an ERP, but I have no knowledge in any framework, is it valid I do everything in hand? I will have the same result? Because I…
-
2
votes2
answers232
viewsQ: Inheritance with Entity Framework
I have a doubt in the inheritance part, I have the person and user classes. Person has its basic attributes and the user inherits from the person. So far so good is right. My problem is that in…
-
1
votes1
answer236
viewsA: COM serial port
Probably is pq the return of the serial port is done in byte, at least in Java is like this, try to find something to concatenate the information. For the return passes as follows Byte G -> Byte…
-
0
votes1
answer283
viewsQ: Validate Business Rule
I’m using this sample tutorial Data repository to create a layered crud with Entity Framework with Code First. My question would be how to validate a business rule where a user with already existing…
-
1
votes1
answer335
viewsQ: Why use MVVM in a WPF + EF + C#
I searched several forums and articles and all say that the MVVM standard should be used when working with an EF + WPF project. Can anyone tell me why that is? because I want to implement a system…
-
5
votes1
answer459
viewsQ: Error Connecting Postgresql to Entity Framework
I am trying to connect the EF in Postgresql. You are presenting the following message: An unhandled Exception of type 'System.Configuration.Configurationerrorsexception' occurred in…
-
3
votes3
answers345
viewsQ: Dynamic search in c# and WPF
Good morning I would like to ask a question about a dynamic research. Setting: I have a search screen, where the user selects 3 fields, being them: The first is the search screen field, where you…
-
-1
votes2
answers144
viewsQ: Error while compiling program
I have these mistakes, being that it’s working! I added the reference, it’s the right BLL folder on the way. I’ve tried and searched for everything but I don’t understand what I have to do. I’ve…
-
0
votes1
answer49
viewsQ: Insert with Postgresql datatime and c#
I would like to ask a question, because the first date does not work? Cmd.Parameters.Addwithvalue("@dtUltAccess", "2017-01-01 01:01:01+09"); Error that returns: Error inserting user - Error: 42804:…
-
1
votes1
answer1211
viewsQ: c# layer development (BBL, DAL, Model, GUI)
In my project I am developing in C# using windows Form Application with the pattern of development in Layers I am in doubt if this form is correct? because I’ve researched a lot about layers, but I…
-
0
votes2
answers1129
viewsQ: Permission Control in c# and Windows Form
I would like to create in C# with Windows Forms ( basically equal Windows folder permission), access levels for users, but not as level 1, 2 and 3, but for example: User A can only view a customer…
-
0
votes1
answer476
viewsQ: Framework c# with windows Form Application
I’m looking to develop a C# ERP with windows Form App, I wonder if there is any framework for this part. Because I searched and found Entity, but I couldn’t find if I can use it in desktop…