mysql - My database don't show any values just 0 -


i have database xampp mysql , put values visual studio 2012.

i have code insert into mytable, insert value, value appears 0. don't know reason because if i'm connected database , send value, table show value write.
knows problem???

imports mysql.data.mysqlclient imports mysql.data imports system.data  public class form1     dim posto_1 integer     dim posto_2 integer     dim posto_3 integer     dim posto_4 integer     dim ip_address integer      dim myconnectionstring string = "server=127.0.0.1; database=base_de_dados; uid=root; password=123;"      private sub inserir_click(sender object, e eventargs) handles inserir.click         dim insert_bd string = "insert linha(endereco_ip, t_paragem_1, t_paragem_2, t_paragem_3, t_paragem_4) values ('@endereco_ip', '@t_paragem_1', '@t_paragem_2', '@t_paragem_3', '@t_paragem_4');"         dim connection new mysqlconnection(myconnectionstring)         dim command new mysqlcommand(insert_bd, connection)          if (posto1text.text = "" or posto2text.text = "" or posto3text.text = "" or posto4text.text = "" or iptext.text = "")             messagebox.show("não foi inserido nenhum valor")         else             ip_address = cint(iptext.text)             posto_1 = cint(posto1text.text)             posto_2 = cint(posto2text.text)             posto_3 = cint(posto3text.text)             posto_4 = cint(posto4text.text)              try                 connection.open()                 listbox1.items.add("base de dados --> escrever. . .")                 command.parameters.addwithvalue("@endereco_ip", ip_address)                 command.parameters.addwithvalue("@t_paragem_1", posto_1)                 command.parameters.addwithvalue("@t_paragem_2", posto_2)                 command.parameters.addwithvalue("@t_paragem_3", posto_3)                 command.parameters.addwithvalue("@t_paragem_4", posto_4)                 command.executenonquery()             catch ex exception                 messagebox.show("erro de ligação", "aviso!!!")             end try              connection.close()             connection = nothing             command = nothing         end if     end sub 


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -