Posts by Ismael • 4,781 points
138 posts
-
3
votes2
answers100
viewsA: How to show the date/time in a modal window?
You need to prepare your project so it has the necessary resources to call the message box. Your "Console Application" application does not contain the DLL System.Windows.Forms, therefore, you need…
-
1
votes1
answer520
viewsA: How to use declare in a database in Mysql?
The clause DECLARE does not initialize the variable. When you declare it, you declare the variable name, the type and a default value, which can be including an expression. Already the clause SET,…
-
0
votes1
answer143
viewsA: Open Form2 and Close Form1, making Form2 the main (without making it invisible)
You should change the way you are starting your application. Consider initializing it with the main form and then call the login form. After user/password verification, return a positive result, if…
-
3
votes1
answer94
viewsA: Error creating XML with Xmlwriter
You need to define the ROOT element - it is the root element of your tree. The first element you should create, will be just this knot. writer.WriteStartElement("root"); Your complete code: class…
-
1
votes2
answers231
viewsA: How to make a SELECT keeping the first column until the records are finished
You can use the junction CROSS, that is, create a cross-junction of your data and with it, you will be able to display ALL table records estadios for each table record pessoa. Code SELECT P.ID,…
-
3
votes1
answer97
viewsA: Excel formula with incorrect result
You will need to use the function E along with function SE; SE the value of F8 (70) is greater than 66 E less than 88, so it’s "BAD," otherwise, "GOOD". The formula will be: =SE(E(F8>1,5*Q2;…
-
2
votes1
answer128
viewsA: Error using Code First From Database
If your relationship entity has only the references to the primary tables, then the RU will only treat it as a collection: Note that the properties are virtual (virtual), that is, the RU maps them…
-
3
votes2
answers2061
viewsA: Parse error: syntax error, Unexpected end of file in
You have not closed the block that WHILE command code. Missing a key (or key, Brace, Curly Bracket) in your code }. <?php $sql = mysql_query("SELECT * FROM comentarios where ativo='sim' order by…
-
1
votes1
answer243
viewsA: JOB with 2 Steps, first step stops when reaches 1 minute of execution
Log in to the SQL Server Agent properties (In the Object Explorer window) and you will see some settings: General Advanced Alert System JOB System -> Open that conf. Set the option to a longer…
-
2
votes1
answer43
viewsA: Creation of Trigger
Trigger below will verify any change in one of these fields (which you have entered) and var enter the value of the Tarefaid field in the Tasks table. Includes a cursor so that if a batch operation…
-
4
votes1
answer3377
viewsQ: Why is the use of ';' mandatory in the WITH clause?
I’ve always used the WITH in my consultations, however, I never understood exactly why is required the ';' before the clause WITH. The Error is very succinct, but it gives an idea that the WITH…
-
2
votes1
answer45
viewsA: Unityengine.Debug error:Log(Object)
From what I understand, the method Debug.Log is not recognizing the object this that you passed as parameter. Debug.Log public static void Log(object message); public static void Log(object message,…
-
1
votes2
answers84
viewsQ: How do I disable the resizable area of a textbox?
I’m not a front-end language enthusiast, but in one of the examples I was testing, I was left wondering how to disable the resizable property of a text area. I know I can resize a text area by…
-
1
votes1
answer368
viewsA: How to pass data from Datagridview to Reportviewer
You need to create and properly initialize the Reportview-specific Datasource: ReportDataSource. Reportdatasource will represent a (valid) data source for a report. When calling the report form,…
-
5
votes3
answers113
viewsA: Sum between Mysql lines
With a single query you can get the balance if you condition the sum for each type of movement. Total inflows - Total outflows Behold: select sum(case when tipoMovimentacao = 1 then quantidade else…
-
3
votes1
answer673
viewsA: Create popup with Rg.Plugins.Popup
On Soen has a reply that can help you. In this link also has another example. Briefly you will do: Installing the plugin in all projects; Add Popup to the shampoo; Use the methods they provide in…
-
2
votes1
answer80
viewsA: Using C# 6.0 in VS2010
Unfortunately you will not be able to use C# 6 resources in VS 2010. If it were at least VS 2012. Follow the evolution of language Current versions C# 7.1 -> VS2017 version 15.3 || .NET Core 2.0…
-
3
votes1
answer2174
viewsA: How to make an insert with conditions in SQL?
I suggest two ways of doing: Form 1 - Condition in select In this case your Index will always be declared with all fields, and instead of values, you will use a conditioned query. DECLARE @opcao…
-
4
votes1
answer1477
viewsQ: What exactly does the Application.Doevents() method do?
According to the help of Microsoft, the method Application.Doevents(): Processes all Windows messages that are currently in the message queue. But what does that mean? Why does he say messages? What…
-
1
votes0
answers28
viewsQ: Do the Rebase from DLL or EXE, is it worth it?
During the development of a Assembly, I ended up "discovering" the following option: Project Properties > Build > Advanced > DLL Base Address and searching for information about it, I…
-
2
votes1
answer1058
viewsA: Error: Value cannot be null. Name of parameter: datatable. VB.NET
Failed to specify the table in your DataSet. See the implementations below to fix the issue: Public Sub PreencheDataGrid(ByRef x As DataGridView, ByVal op1 As Integer, ByVal op2 As Integer) Dim SDA…
-
1
votes1
answer674
viewsA: Assign a variable a Dynamic Date?
You used the wrong part of Procedure to make your assignments. Before the begin is the declaration of the identity of the Procedure, and inside, the body. In the identity part you can define the…
-
3
votes1
answer298
viewsA: Error trying to insert Datetime.Minvalue into database
Simply you can pass one null to the database as a parameter for when in its variable it has the MinValue. In the parameter, you have to convert to Object date to be compatible with DBNull.Value. See…
-
2
votes3
answers847
viewsA: How to create Login and User in SQL Server passing command line through Visual Studio passing parameters?
There are several options to create a login on the server, the creation of logins is a step that should be done carefully, well thought out, because you must protect your data - both internal and…
-
1
votes2
answers269
viewsA: Select in windows form c#
The method below will create a list of all checkbox of the previous versions, and finally, we will assign this method to the event of each checkbox. private void…
-
2
votes3
answers96
viewsA: Capture Textbox that called the event
In this reply was given a good explanation on the sender. For your case, completing the jbueno answer, I implemented a way for you to assign to all textboxes the event GotFocus. Including, a way to…
-
3
votes1
answer807
viewsA: How to Compare More than One Piece of Data Between Two Sheets and Sum That Data Based on a Condition
One way to solve it is to create a formula in your worksheet 1 (or even in 2) that returns 1 or 0, and with this, you can make a sum in your third worksheet, see the formula: =SE(E(L2="sucesso";…
-
2
votes2
answers590
viewsA: What is the useshellexecute property for?
That property UseShellExecute is related to the use of the function ShellExecute existing in Windows ie if you mark as true the class Process will use the function ShellExecute, otherwise, use the…
-
3
votes3
answers5873
viewsA: Remove repeated lines in all aspects on Oracle
Understanding that you want to delete duplicate records from the database but, keeping one (1) of them, I suggest using the rowid. The ROWID is a pseudo-column that returns the address of a record,…
-
2
votes2
answers2102
viewsA: Case no order by
Correctly separate your columns with the help of the case. It is important to note that there can be no ambiguity in the conditions. Each column (the cases) will receive the keyword DESC or ASC.…
-
1
votes1
answer308
viewsA: mysql and php - subtract the last two records from the same column and divide by the last record from another column
The query below will return in a new column the yield (according to its formula): select *, cast((select (car.kilometragem - cAnt.kilometragem) * 1.0 from carro_log cAnt where cAnt.id = car.id and…
-
2
votes1
answer449
viewsA: Could not write Metadata for ː/Remotesystemstempfiles'
You can delete it if you want, it doesn’t hurt other projects. It’s created by the remote system explorer that comes with Eclipse. To prevent it from being created again (in a new project), turn…
-
1
votes1
answer305
viewsA: several foreign SQL keys
A brief summary Primary and Foreign Keys are two types of constraints that can be used to enforce data integrity in tables. Generally, a table has a column or combination of columns that contains…
-
1
votes3
answers2114
viewsA: Insert if it does not exist or Update if it already exists in Mysql?
Try one of the ways below. Assigning total records found in a variable. declare @total int; set @total = (select count(*) from configs where id_serie = :id) if (@total > 0) update anime_configs…
-
1
votes1
answer26
viewsA: Record values of a related table concatenated in the main entity query
Using the function group_concact you can concatenate in the same column all the records of your table of technicians by id and nome. Note that the sub-query in the daughter table with this function.…
-
1
votes1
answer42
viewsA: Two databases communicate with the same template
An alternative answer in the question Different connectionstring for different builds you can use the Directives for pre-processing. "The #if, #Elif, #Else, and #endif directives are used in…
-
2
votes1
answer236
viewsA: Debug Proc in sql server 2014 database
A way to realize the debug that I normally use in my Store Procedures is with the use of TRY / CATCH. Take an example: Note that SQL starts counting according to query that you created. Always…
-
1
votes1
answer368
viewsA: Framework for Windows Forms or WPF
Check out the Rocket Framework - Windows Form It uses the Entity Framework as the back-end; Allows automatic linking of the data source to the interface; Use Generic to minimize programming;…
-
1
votes1
answer76
viewsA: System.Drawing Image Class unavailability
If you want to use this class (Image) in namespace, will have to define a Alias for her. After that, you can do the following: using System; using System.Drawing; using System.Windows.Forms; using…
-
3
votes1
answer683
viewsA: Select fields to return in an SQL INNER JOIN
You will get prefixing (Alias) the tables: SELECT TBL1.*, TBL2.seu_campo FROM table1 TBL1 INNER JOIN table2 TBL2 ON xxxxx Related How to select multiple columns using the table prefix only once?…
-
2
votes3
answers190
views -
3
votes1
answer442
viewsA: How to simulate the event of typing the % (percentage) symbol when pressing Shift+5?
You will have to combine the properties KeyCode and Modifiers to form the "%": if (e.Modifiers == Keys.Shift && e.KeyCode == Keys.D5) //seu código or directly access the property Shift: if…
-
3
votes3
answers8033
viewsA: Do not repeat records in a Join
A simple distinct will solve: SELECT DISTINCT ER.ID_EXM_REA FROM T_CMO_EXAME_REALIZADO ER INNER JOIN T_CMO_PLANILHA_LEITURA PL ON ER.ID_XFC = PL.ID_XF The keyword DISTINCT eliminates duplicate lines…
-
2
votes1
answer54
viewsA: Configuration of Visual Studio
You can create a Project Model From your project, which will be the model for the others, make the following steps: In the File menu, click Export Template. The Export Template wizard opens; Click…
visual-studioanswered Ismael 4,781 -
1
votes1
answer53
viewsQ: Error 503 when trying to download extensions in Visual Studio Gallery
While trying to download any extension, the error below is displayed: The Extension could not be installed because the following error occurred: The remote server returned an error: (503)…
-
1
votes1
answer36
viewsA: Is there any way to wipe the screen without cycling with ' n' ?
Two possibilities I know: final String sisOpe = System.getProperty("os.name"); if (sisOpe.contains("Windows")){ Runtime.getRuntime().exec("cls"); }else{ Runtime.getRuntime().exec("clear"); } or…
-
3
votes2
answers7324
viewsA: What is a lock and what are its causes?
The SGDB regulates itself to the right to manipulate the tables/ records according to the queue of operations, that is, it performs locks to ensure the accomplishment of the pending operations (no…
-
7
votes2
answers441
viewsQ: Query that returns if the child has inherited the parent’s and/or mother’s surname
I have a scenario that I need to sort my records where: The child inherited the surname of the father and/or his mother? Note in the image that if one of the child’s surnames exists in the parent’s…
-
3
votes3
answers191
views -
8
votes3
answers4491
viewsA: How to check if the program is already running in C#
You can also make use of Mutex Obs: in the 2nd parameter (Name), I managed a GUID. using System.Threading; static class Program { static Mutex mutex = new Mutex(true, name:…