1
query += txtServidor.Text + "',";<br>
query += double.Parse(txtVencimento.Text) + ",";<br>
query += int.Parse(txtBanco.Text) + ",'";<br>
INSERT INTO tbl_associados VALUES(10,'testando','001.318.555-55','categoria','ativo',
'MG-13.131.313','2010-07-10','ssp/mg','1999-07-07',20,'2014-12-10','M','SI','Solteiro','',
'pai teste','mae teste','(31)3333-3333','(33)9999-9999','(37)9999-8888','email teste',
'Avenida teste',444,'','bairro','cidade','30421-888','MG','07 -Timóteo','setor','cargo',
'dez/2010',10025,1044,'1234','4','013','S','S');
The value "10025" in the last line should be "100.25", the txtVencimento.Text
received the correct value 100.25, however to thresh the code realized that by concatenating the value with the rest of the query, the point was simply ignored (alone) and is going as I showed up on query.
In the database the maturity is of the type double(9,2) not null
.
Take a look at [tour]. You can accept an answer if it solved your problem. You can vote on every post on the site as well. Did any help you more? You need something to be improved?
– Maniero
Removing "Parse" can solve, since the variable 'query' is string and you will concatenate all values as string. There is no logic to convert to double/int if it will be concatenated as string.
– Jhonny Mesquita