Can someone help me with this?
My question is that yesterday i inserted data in mysql. the data in mysql is compost of 22,000 records in 55 fields and when i check the data today it is lost? how does it happen? how can i fix it? does the problem is in network connection because im on a lan? i hope someone help me.
here is my code
<pre lang="sql">Dim importantmessage As String
importantmessage = MsgBox("ALL DATA COMPLETED, DO YOU WANT TO SAVE THIS?", vbYesNo)
If importantmessage = vbYes Then
MaskedTextBox20.Text = DatePicker1.Text
Dim con As MySqlConnection = New MySqlConnection("server=192.168.1.1;Port=3306;Database=sginfo ;Uid=root;Pwd=sample;")
Dim cmdinsert As MySqlCommand = New MySqlCommand("INSERT INTO personinfo(surname,firstname,middlename,present_currentaddress,provincialaddress,noofchildren,height,weight,birthdate,age,birthplace,gender,civilstatus,educationalattain,schoolname,course,yearsofstudy,collegestatus,trainingschoolname,positiontrained,yearstrained,coursetrained,detachment,region,effdate,workstatus,empnumber,positionemployed,yearsofemployed,sssnumber,tinnumber,nbi,nbidate,pnp,pnpdate,priorexp,gdexp,guardposition,uniformdate,millitary,los,previousemp,licno,licdate,licexp,dateofemp,badgeno,neurocenter,neuroresult,neurodate,drugcenter,marijuana,shabu,drugresult,agency,histories,agepattern,depend,phil,pagibig) VALUES (@SurName,@FirstName,@MiddleName,@Present_CurrentAddress,@ProvincialAddress,@Noofchildren,@Height,@weight,str_to_date(birthdate,'%d-%m-%Y'),@age,@birthplace,@gender,@civilstatus,@educationalattain,@schoolname,@course,@yearsofstudy,@collegestatus,@trainingschoolname,@positiontrained,@yearstrained,@coursetrained,@detachment,@Region,str_to_date(@effdate,'%d-%m-%Y'),@workstatus,@empnumber,@positionemployed,@yearsofemployed,@sssnumber,@tinnumber,@nbi,@nbidate,@pnp,@pnpdate,@priorexp,@gdexp,@guardposition,@uniformdate,@millitary,@LOS,@previousemp,@licno,@licdate,@licexp,@dateofemp,@badgeno,@neurocenter,@neuroresult,@neurodate,@drugcenter,@marijuana,@shabu,@drugresult,@histories,@agency,@agepattern,@depend,@phil,@pagibig);")
cmdinsert.Parameters.AddWithValue("surname", txtsurname.Text)
cmdinsert.Parameters.AddWithValue("firstname", txtfirstname.Text)
cmdinsert.Parameters.AddWithValue("middlename", txtmiddlename.Text)
cmdinsert.Parameters.AddWithValue("present_currentaddress", txtaddress.Text)
cmdinsert.Parameters.AddWithValue("provincialaddress", txtprovince.Text)
cmdinsert.Parameters.AddWithValue("noofchildren", txtchildren.Text)
cmdinsert.Parameters.AddWithValue("height", txtheight.Text)
cmdinsert.Parameters.AddWithValue("weight", txtweight.Text)
cmdinsert.Parameters.AddWithValue("birthdate", DatePicker1.Text)
cmdinsert.Parameters.AddWithValue("age", txtage.Text)
cmdinsert.Parameters.AddWithValue("birthplace", txtbplace.Text)
cmdinsert.Parameters.AddWithValue("gender", cmbgender.Text)
cmdinsert.Parameters.AddWithValue("civilstatus", cmbcivil.Text)
cmdinsert.Parameters.AddWithValue("educationalattain", ComboBox4.Text)
cmdinsert.Parameters.AddWithValue("schoolname", TextBox11.Text)
cmdinsert.Parameters.AddWithValue("course", TextBox10.Text)
cmdinsert.Parameters.AddWithValue("yearsofstudy", TextBox9.Text)
cmdinsert.Parameters.AddWithValue("collegestatus", TextBox8.Text)
cmdinsert.Parameters.AddWithValue("trainingschoolname", TextBox6.Text)
cmdinsert.Parameters.AddWithValue("positiontrained", ComboBox3.Text)
cmdinsert.Parameters.AddWithValue("yearstrained", TextBox7.Text)
cmdinsert.Parameters.AddWithValue("coursetrained", TextBox1.Text)
cmdinsert.Parameters.AddWithValue("detachment", ComboBox2.Text)
cmdinsert.Parameters.AddWithValue("region", ComboBox7.Text)
cmdinsert.Parameters.AddWithValue("effdate", maskedtextbox3.Text)
cmdinsert.Parameters.AddWithValue("workstatus", ComboBox1.Text)
cmdinsert.Parameters.AddWithValue("empnumber", TextBox29.Text)
cmdinsert.Parameters.AddWithValue("positionemployed", TextBox30.Text)
cmdinsert.Parameters.AddWithValue("yearsofemployed", TextBox31.Text)
cmdinsert.Parameters.AddWithValue("sssnumber", TextBox5.Text)
cmdinsert.Parameters.AddWithValue("tinnumber", TextBox4.Text)
cmdinsert.Parameters.AddWithValue("nbi", TextBox3.Text)
cmdinsert.Parameters.AddWithValue("nbidate", textbox58.Text)
cmdinsert.Parameters.AddWithValue("pnp", TextBox2.Text)
cmdinsert.Parameters.AddWithValue("pnpdate", maskedtextbox5.Text)
cmdinsert.Parameters.AddWithValue("priorexp", TextBox24.Text)
cmdinsert.Parameters.AddWithValue("gdexp", TextBox25.Text)
cmdinsert.Parameters.AddWithValue("guardposition", ComboBox11.Text)
cmdinsert.Parameters.AddWithValue("uniformdate", maskedtextbox6.Text)
cmdinsert.Parameters.AddWithValue("millitary", TextBox26.Text)
cmdinsert.Parameters.AddWithValue("LOS", TextBox28.Text)
cmdinsert.Parameters.AddWithValue("previousemp", TextBox27.Text)
cmdinsert.Parameters.AddWithValue("licno", TextBox32.Text)
cmdinsert.Parameters.AddWithValue("licdate", maskedtextbox2.Text)
cmdinsert.Parameters.AddWithValue("licexp", maskedtextbox1.Text)
cmdinsert.Parameters.AddWithValue("dateofemp", maskedtextbox7.Text)
cmdinsert.Parameters.AddWithValue("badgeno", TextBox12.Text)
cmdinsert.Parameters.AddWithValue("neurocenter", TextBox14.Text)
cmdinsert.Parameters.AddWithValue("neuroresult", ComboBox6.Text)
cmdinsert.Parameters.AddWithValue("neurodate", maskedtextbox8.Text)
cmdinsert.Parameters.AddWithValue("drugcenter", TextBox15.Text)
cmdinsert.Parameters.AddWithValue("marijuana", ComboBox5.Text)
cmdinsert.Parameters.AddWithValue("shabu", ComboBox12.Text)
cmdinsert.Parameters.AddWithValue("drugresult", maskedtextbox9.Text)
cmdinsert.Parameters.AddWithValue("histories", RichTextBox1.Text)
cmdinsert.Parameters.AddWithValue("agency", combobox21.Text)
cmdinsert.Parameters.AddWithValue("agepattern", MaskedTextBox20.Text)
cmdinsert.Parameters.AddWithValue("depend", TextBox59.Text)
cmdinsert.Parameters.AddWithValue("phil", TextBox60.Text)
cmdinsert.Parameters.AddWithValue("pagibig", TextBox61.Text)
cmdinsert.CommandType = CommandType.Text
cmdinsert.Connection = con
con.Open()
cmdinsert.ExecuteNonQuery()
MsgBox("Information, Successfully saved")