Posts by Fabrício Mendes • 843 points
43 posts
-
1
votes0
answers71
viewsQ: Configuring a DSN via C#Code
Hello found this article talking about how to do Configuring a DSN via VB Code. Is there any way to do the same in C# for a connection to BD Mysql? Thank you... VB - Configuring a DSN via Code…
-
0
votes1
answer430
viewsA: Crystal Report Runtime is crashing
After breaking his head and almost going crazy, found out what caused the error. The ODBC data source was set only to "User Data Source". I just switched to the "System Data Source" which is all…
-
3
votes1
answer430
viewsQ: Crystal Report Runtime is crashing
Hello I am trying to fix an error in my application, I used FUSLOGVW.exe to know which dlls were missing are wrong. It is returning me this msg: But the dll msvcm80.dll hand is part of my project,…
-
0
votes1
answer790
viewsA: inserting image in mysql database
I solved my problem with a POG (kkkk) is not the best way, but solved it. I used the **File.Copy()**, I copied the file from the virtual machine to the location (where the application is running). I…
-
0
votes1
answer790
viewsQ: inserting image in mysql database
If I want to insert an image in the database just use the following query: INSERT INTO teste (Id_Blob,Na_Imagem) VALUES (1,LOAD_FILE("C://imagem.png")); if I want to insert an image that be on…
-
1
votes1
answer1981
viewsA: Save Image c#
Well if you got here crazy for a reply. A few hours later I had the following conclusion. on the line where you save the picturebox, which in my case is named after Imagemcamera, would look like…
-
1
votes1
answer1981
viewsQ: Save Image c#
I’m having the following mistake Generic error of GDI+. when trying to save the image in a specific directory. I am using code below. string caminho=@"\\\10.1.1.10\\sistema"; Stream myStream = null;…
-
2
votes2
answers917
viewsA: Print word file by c#
I used that code.Nousing Microsoft.Office.Interop.Word; My code went like this. string CaminhoArquivo = "C:\\arquivo.doc"; Microsoft.Office.Interop.Word.Application wordApp = new…
-
3
votes2
answers917
viewsQ: Print word file by c#
Hello guys I am trying to print a word.doc file, I am using the following code. using Microsoft.Office.Interop.Word; Microsoft.Office.Interop.Word.Application application = new…
-
3
votes2
answers8188
viewsQ: Read specific text inside a . txt in c#
I need to read a text file that contains several lines: 1 C0000000000 132008281 06140214 080515 0000000005990 00000000000000000000000000000000000599000000000000000000000000000 I need to take only…
-
0
votes2
answers2047
viewsA: Traverse components of form C#
You got this far without an answer. see how I solved my problem //Primeiro percorri as colunas do datatable; for (int i = 0; i < Tabela.Rows.Count; i++) { //Garanti que as células não estejam…
-
0
votes2
answers2047
viewsQ: Traverse components of form C#
Hello I have a table coming from the database, with several rows and columns. One of these columns is stored the address of the previously saved image. Now I need to go through all Picturebox and…
-
1
votes1
answer1126
viewsQ: Previous registry Mysql
Hello I am trying to see the previous record in relation to the current record. I am using the following Cód. SELECT * FROM Tabela WHERE compoid <"Contraband" ORDER BY compoid DESC LIMIT 1; But…
-
1
votes1
answer221
viewsQ: C# and mysql paging
I have a form and a datagrid, in this form I am using a timer to do a search in mysql that fills the datagrid datasouce, so far everything right. Now I need to limit the amount of research. Ex:…
-
1
votes3
answers7968
viewsQ: Delete a line in Datagrid
I’m trying to exclude the line on which you have the focus of a datagrid, I have used the following code: datagrid.Rows.RemoveAt(e.RowIndex); Is returning the following message: Uncommitted new Row…
c#asked Fabrício Mendes 843 -
0
votes4
answers1058
viewsA: How to copy a datagrid to an arraylist
My code went like this string[,] myList = new string[dataGridView1.ColumnCount, dataGridView1.RowCount]; //define o tamanho da variavel for (int i = 0; i < dataGridView1.RowCount-1; i++)…
-
0
votes4
answers1058
viewsQ: How to copy a datagrid to an arraylist
I have a button and command and when I click it, I need to copy all the information from my datagrid to an Arraylist. For example: The datagrid has 4 columns and 10 rows all have information, now…
-
0
votes1
answer274
viewsQ: Distribuir Crystal Report
I have an application running on C# windows Form, and I need to install the Crysal Report in the customer’s machine. have this msi Crforvs_13_0_5, but when it is run on the client machine, and says…
-
8
votes1
answer6718
viewsQ: Truncate all tables in a database in Mysql
There are ways to use the TRUNCATE to clear all bank tables? TRUNCATE tabela; This command cleans one by one.
-
2
votes2
answers816
viewsQ: Convert hexadecimal to integer
I have this hexadecimal value "E365A931A000000". I need to convert it to integer I’m using the following code. string hex = "E365A931A000000"; CodLibercao = Convert.ToInt32(hex); This code is…
-
2
votes1
answer624
viewsA: Format text in Crystal report
What I did to solve my problem was this: I used a formula to display the field in the report in the desired format. Select Formula Field.Enter the name for the formula and click OK…
-
4
votes1
answer624
viewsQ: Format text in Crystal report
Well I’m needing to print a bankroll with following. Our number should look like this 15/200020-3. That same number is saved in the BD thus: 152000203. How do I put the bar in the 3rd house, and the…
-
1
votes1
answer2293
viewsA: Calculation formula for the general check digit
If you as I have come this far. Here’s how I solved my problem. The general checker digit corresponds to the 5th position of the barcode. The digit 0 (zero) in the 5th position will indicate that…
-
1
votes1
answer2293
viewsQ: Calculation formula for the general check digit
I need to calculate the general checker digit corresponds to the 5th position of the barcode, have the following data. The check digit will be the result of the subtraction: 11 - rest of the…
-
4
votes2
answers3760
viewsQ: Calculation of the multiple of 10 greater than or equal to a value
use module 10; Example: 7 4 8 9 3 1 0 7 2 <== Dados x x x x x x x x x 2 1 2 1 2 1 2 1 2 <== Peso = = = = = = = = = 14 4 16 9 6 1 0 7 4 <= Resultado 1+4=5 1+6=7 //resultado da multiplicação,…
c#asked Fabrício Mendes 843 -
2
votes1
answer123
viewsQ: Hide filenames at compression time
I am using the syntax below to zip files. 7z u -t7z destino\arquivo.7z origem\arquivo.*. The parameter u does with the 7z.exe compact only the modified files. My doubt is that when I run this…
-
2
votes1
answer1039
viewsQ: Encryption of mysql data
Can someone help me, I am using AES_ENCRYPT(string, string_key) (manual) to make cryptographic with key. Veja minha sintax. INSERT INTO trava (codigoliberacao) VALUES (AES_ENCRYPT('123456789',…
mysqlasked Fabrício Mendes 843 -
5
votes1
answer2172
viewsQ: Revoke privileges
I have a database and I’m trying to make sure that only my user has access to this base. ie no one else can open, search, delete anything. I’m using the following syntax: GRANT USAGE ON batabase.*…
-
1
votes1
answer1688
viewsQ: Secure backup using Mysql and C#
My application is C# and BD is Mysql, when I do the backup he creates a arquivo.sql. That one arquivo.sql can be easily edited in a notepad, or any other editor, thus leaving my comic very truthful,…
-
0
votes1
answer531
viewsQ: Deploy applications with Mysql
Does anyone know how to distribute the application and mysql database together? I’m using Innosetup, I can even install mysql, start the service but when I connect it gives error saying I can not…
mysqlasked Fabrício Mendes 843 -
1
votes1
answer1783
viewsQ: Format cell in Datagrid at runtime C#
I am creating a Datagridview automatically with a time column and am using the time format 00:00, as follows below. dgvhorario.ColumnCount = 1; dgvhorario.Columns[0].Name = "Horário";…
-
1
votes6
answers15655
viewsA: Clear a datagridview in C#
Hello guys I solved my problem like this: Clear a dataDrid C# dataGridView1.DataSource = null; Then you just do: dataGridView1.Columns.Add("Coluna", "Coluna");//Acrescenta colunas…
-
3
votes6
answers15655
viewsQ: Clear a datagridview in C#
I tried all this already and nothing has worked. Everyone is deleting the lines and column. What I need is to clear the content written on them. datagridview.datasource=null;…
-
1
votes1
answer2976
viewsA: Insert data into the database via a C#Ridview dataset
strSelect = "SELECT SUM(qtdVagas) AS Vagas FROM laboratorio"; DataTable tabela; tabela = conexao.ExecutarSelect(strSelect); for (int i = 0; i <…
-
1
votes1
answer2976
viewsQ: Insert data into the database via a C#Ridview dataset
I have a form in C#: On this form there is a textbox where I enter the day of the week and a datagrid where I type in the hours. I put a column call time, with DataGridViewCellStyle { Format=t }…
-
1
votes2
answers1997
viewsA: C# Simple - Forms - Pass to the datagrid what I select in the combobox
Well I don’t quite understand it, but I think you want the content of the datagrid in the textbox and this? if it is. place the following line in the double clik event or clik in the datagrid.…
-
1
votes5
answers13026
viewsQ: Coin style in a Textbox in Winforms
I need to put the text R$ in a textbox so that it has the following format: R$: 1,200.58 I am trying in the following ways without success: textbox1.Text =…
-
1
votes2
answers995
viewsQ: Convert text to number in C# to write to DB
I’m using this conversion to get the string from txtvalor.text and turn it into such a value: 1.500,80 curso.Valor = double.Parse(txtValor.Text); Example I type 1,500.80. And I would like you to…
-
1
votes1
answer570
viewsQ: Log Navigation C#
I have Two buttons: Next and Previous in a Windows Forms application in C#, I am using an SQL statement: SELECT * FROM aluno LIMIT 1; for MYSQL. This statement takes the first record. Now comes the…
-
1
votes1
answer1937
viewsQ: How to remove mask from a Maskedtextbox
I’m using Visual Studio to make an application using Windows Forms in C# and I need to get all the Maskedtextbox of the form, without masks. I’m using the code below right now. The Maskedtexbox are…
-
1
votes4
answers642
viewsA: Prevent user from saving information in the bank
Hello friends I managed to solve my problems with this method public bool VerificarCamposEmBranco(Control ctrl) { bool retorno = false; foreach (Control c in ctrl.Controls) { if (c is TextBox) { if…
c#answered Fabrício Mendes 843 -
1
votes4
answers642
viewsQ: Prevent user from saving information in the bank
Hello I’m wearing Windows FORM C# Visual Studio, how do I prevent the user to save the information in the bank without filling in the required fields, that is to say (NOT NUL) from the bank all this…
c#asked Fabrício Mendes 843 -
2
votes3
answers42978
viewsQ: How to make a select with multiple `Where field like '%'` in C#
select below even works, but it searches all fields and would like the idaluno, nomealuno and cpf were searched and ordered by idaluno SELECT…