Posts by Maurício Sanches • 487 points
40 posts
-
0
votes0
answers130
viewsQ: GROUP_CONCAT bringing incomplete response
I am trying to bring all the product names (even the repeated ones) I have registered in a spreadsheet, but the code is stopping in the middle of the process. Can anyone tell me why ? Is there a…
-
1
votes1
answer249
viewsQ: Viewing PDF file after obtaining bytes
I would like to view a file .PDF staying at a FTP. I can get the Stream through the bytes, but I can’t create the file in a browser. Follow the code so far: private void btnVerFilePdf_Click(object…
-
0
votes1
answer59
viewsQ: IFNULL is not working
select IFNULL(valor_unit,0) from tb_itens where id = 3 In the scenario where the id = 3 does not exist in my table the SELECT does not return '0' just keeps returning NULL, I can’t find the problem.…
mysqlasked Maurício Sanches 487 -
-1
votes1
answer117
viewsQ: Property Hasrows in C#
I’m making a SELECT mysql with inner join within my application C# MySqlCommand _comandoDados = new MySqlCommand(String.Format( "select EMGroot.id, EMGroot.lbs_net, EMGroot.lbs_gross_aai,…
-
1
votes1
answer2850
viewsQ: mysql - using SUM()
I need to sum the total value of an order with more than 1 product included with different unit values. follow tb_request: id_pedido | id_produto | valor_unit | qtd…
mysqlasked Maurício Sanches 487 -
0
votes1
answer132
viewsQ: SELECT with LEFT JOIN successfully but some wrong results
I need to make one SELECT using 2 tables with LEFT JOIN, I successfully get the query, but it brings me some columns with wrong results. The results of the First table are: tbEntregas…
sqlasked Maurício Sanches 487 -
0
votes0
answers372
viewsQ: How to read/open an FTP file via C#
My scenario is a app where I need to open a file in . PDF; do not download, I want to open it direct. I found several tutorials where they teach Uploads and Downloads, but none that shows how to…
-
0
votes1
answer48
viewsQ: Problems with JOIN and CONDITIONS - sql
I’m having to fetch in 2 table some data with certain conditions, follows the situation: table: tbTransmitted => Colunas: Code - Qty - On request table: tbEstoque => Colunas: Code - Qty -…
-
1
votes1
answer514
viewsQ: How to put subtitles at the bottom of the Chart?
I have been trying to work with Chart in C#. But now I can’t leave all the subtitles underneath their respective columns. The image shows that caption 1, 3, 5, 7, 9 and 11 are not appearing, even if…
-
0
votes1
answer40
viewsA: Backup Database - error in SQL Syntax
Answering my own question: The Error is actually in the command that is for Sqlserver and not for Mysql. follows the command for MYSQL: private void FazerBackup_Click(object sender, EventArgs e) {…
-
1
votes1
answer40
viewsQ: Backup Database - error in SQL Syntax
I am building a button to make a backup of mine dbvia application C#, everything is going well, but at the time of applying the Executenonquery is accusing error of syntax. Follows: Designate Path:…
-
2
votes2
answers20
viewsQ: Create COLUNM with results from an account made within a ROW - Mysql
Probably the title of this question is not correct, the case is that I would not know how to explain my doubt without an example. I have a scenario where I need to add up the values of products that…
mysqlasked Maurício Sanches 487 -
1
votes2
answers83
viewsQ: Set of WHERE , AND and OR conditions in SQL does not produce the expected result
I’m trying to get some records with a very simple syntax, but it’s not working. I’m doing something wrong and I’m not realizing it. Can someone lend a hand? I need to fetch all records from 2017…
-
0
votes2
answers753
viewsQ: UNION with 2 DATABASES, SQL
I need to integrate 2 TABLES from DBdifferent in one DGV. I found several tutorials, but none that helped me from setting up to the connection, at least not the way I work with the connections.…
-
0
votes2
answers1157
viewsQ: exceeded the 'max_user_connections' Resource
I’m not sure what the reason for the error I’m having but it seems that it is something related to open connections in the bank, where error is occurring if the application tries to create more…
-
1
votes1
answer24
viewsQ: Sums and Reformatting db for a Datagridview
I probably did not draw up a correct title, but I will try to explain my very detailed question. I’m working with Windowsform at Visualbasic15 I need to make a form where I get data from a tb in a…
-
1
votes2
answers888
viewsQ: How to compare 2 cells in different columns - SQL
I need to make a SELECT searching some data with the condition that only if the value of a given cellis different from another cell. Ex: +-----------+------+------+ | Descricao | Val1 | Val2 |…
-
0
votes1
answer89
viewsQ: How do I view an image hosted in my App?
I would like to display a promotional image within a PicutreBox in my app, but this image will vary according to the promotion that the Company will make. Is there any code that PictureBox show a…
-
1
votes1
answer111
viewsQ: Automatic view of a selected Row
I have a spreadsheet where I can upload numerous records, and I also have a field to search for any record. When I look for a particular record and the system finds this ROW it is automatically…
c#asked Maurício Sanches 487 -
0
votes0
answers50
viewsQ: Delay when executing SQL commands
I have a system where I work with a db online hosted in Justhost.com. I suffer with the delay in executing the commands, but not always these delays exist, sometimes a command takes less than 1s and…
-
4
votes2
answers25412
viewsQ: Using WHERE with INNER JOIN
There is a way to use one WHEREto make a SELECTwith INNER JOIN ? my case is this: SELECT CodCli, NomeCli FROM tbvendas INNER JOIN tbclientes ON tbvendas.CodCli = tbclientes.AutoCod I’d like to put a…
-
0
votes1
answer665
viewsA: Printing with Printdocument, Printpreviewdialog C#
PROBLEM SOLVED ! I just set up the Settings in the property, as in the Code below: The values in the prowess of the PAPERSIZEis an account: All sizes are converted from MM to INCHES and then…
-
1
votes1
answer665
viewsQ: Printing with Printdocument, Printpreviewdialog C#
I’m trying to print labels of my products straight from my app. However I am not able to reduce the size of the paper in the printing, for this reason I’m losing 1 label every 1 impression I make,…
-
2
votes2
answers1842
viewsQ: How to import ACCESS data to MYSQL
I have a db ACCESS with many tables and a lot of recorded data, I need to import these tables for my new dbin MYSQL. someone knows a way ? or a tutorial to follow ? I’m using Mysql-Front and…
-
1
votes1
answer743
viewsA: Decimal places in C#DGV
I managed to solve my problem with the following codes ! NomedoDataGrid.Columns[Numero ou Nome da Coluna].DefaultCellStyle.Format = "C2" monetary values to two decimal places…
c#answered Maurício Sanches 487 -
0
votes1
answer743
viewsQ: Decimal places in C#DGV
Here are 2 images that summarize my problem. Screenshot of db (Access) Image of the Datagridview When launched values with decimal places "0" the DGV does not show, Ex: 1.00 = 1 1.50 = 1.5 Follows…
c#asked Maurício Sanches 487 -
1
votes1
answer33
viewsQ: Fit the Columns header into a DGV, C#
Is there any way to fit the columns in a DMV so that not on the space (Follows the img as example). Or Resize the DGV to go back to the required size columns? at runtime. I’m using direct connection…
c#asked Maurício Sanches 487 -
3
votes1
answer113
viewsQ: Error, Loop when pressing ENTER with e.Keycode
I’m trying this code: private void txtEmgSearch_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { this.btnEmgSearch.PerformClick(); } } The command itself works normally, but…
-
0
votes1
answer38
viewsQ: Lack of Assembly Reference C#
I have an error of lack of use of Directive or a Assembly Reference aimed atKeyCodand Modifiers Can anyone tell me what it would be and how I can carry it ? private void lblAutoCod_MouseClick(object…
-
1
votes2
answers323
viewsQ: Syntax error in SELECT WHERE using ADO.Net parameters
Someone understands this mistake and gets a solution? Code: OleDbConnection ConSelect = new OleDbConnection(); ConSelect.ConnectionString = Properties.Settings.Default.dbInvoice; ConSelect.Open();…
-
1
votes1
answer506
viewsQ: Fill in Combobox without repetitions
I’m trying to fill one ComboBox from a db, but the ComboBox is filled with many repeated items! OleDbConnection Con = new OleDbConnection(); Con.ConnectionString =…
-
0
votes1
answer613
viewsA: Create a Table at runtime. C#
Good morning! I managed to create the table in Runtime, from this code. OleDbConnection Con = new OleDbConnection(); Con.ConnectionString = Properties.Settings.Default.dbteste; Con.Open();…
-
0
votes1
answer613
viewsQ: Create a Table at runtime. C#
Hello, I need to create a table within a DB Access at runtime. The Database already exists, I would just like to click on a buttona new tablewas created within this DB with Nome de Campos and Data…
-
2
votes1
answer1127
viewsQ: Selecting Row on a Datagrid from a query. C#
Good afternoon, you guys, Someone has a code where I can select a Row in a DataGrid, from a survey ? Where I place mine Button_Click to a TextBox with a certain value, searching DataGridView, thus…
c#asked Maurício Sanches 487 -
0
votes1
answer543
viewsQ: Calculation in a Datagrid. C#
Hello. Is there any simple way, working directly with the db to make calculations in a datagrid cell. Situation: I have a Column Qtd, another ValorUnitario and another ValorTotal of a certain item.…
c#asked Maurício Sanches 487 -
0
votes1
answer305
viewsA: Stock Quantity Management C#
Good morning Guys, I was able to solve the problem according to what Zekk and Diego said. (I worked the sum of the amount in hidden Textboxs, so I didn’t have to add in variables). Follows: private…
-
0
votes1
answer305
viewsQ: Stock Quantity Management C#
I cannot find a solution for stock and sales management. The scenario would be a stock of Auto parts, where I register the entry of a product in the stock with a certain amount. Cod - name - Qtd -…
-
0
votes1
answer190
viewsQ: Remove Null Item from a Combobox c#
Hello, I need to develop an advanced search filter. I created some comboBoxs for the keywords, but whenever I need to fetch the contents of a column that eventually has less content than another…
-
2
votes1
answer213
viewsA: How do I use the service based database item in Visual Studio 2015?
Leonardo, I also use VB2015 for C#programming, I don’t know what language you’re specifically working with, but in C# I normally use the Service-Based Database, even in VB2015 version Path: (Right…
-
4
votes3
answers162
viewsQ: Problems with SELECT with 2 Wheres
I’m having a bit of an amateur problem here. I’m not getting this SELECT from 2 CONDITIONS, and I can’t find the ERROR! Someone please give me a light there! Follows the Code: OleDbConnection Con =…