Hi!
I have the next development that I want to upload all the columns values of the listview in to MySQL.
I have the next Code:
This code works but only save the singles values .. What use to indicate that they complete all registration upload it all data column information in to MySQL?
Best Regards!:wave:
I have the next development that I want to upload all the columns values of the listview in to MySQL.
I have the next Code:
Code:
'secuencia para guardar en MYSQL
If sconnection.State = ConnectionState.Closed Then
sconnection.ConnectionString = "Data Source=192.168.1.32;Database=time;User ID=MXUZ;Password=Asdas34;"
sconnection.Open()
End If
'Dim sqlquery As String = "INSERT INTO registro(user,project,step,date,starttime,endtime,progress,activity,case,line,description) values ('" & user.Text & "','" & ComboBox1.Text & "','" & ComboBox3.Text & "','" & DateTimePicker1.Text & "','" & starttime.Text & "','" & endtime.Text & "','" & TextBox1.Text & "','" & ComboBox5.Text & "','" & TextBox3.Text & "','" & TextBox2.Text & "','" & TextBox2.Text & "')"
Dim sqlquery As String = "INSERT INTO registro(user,project,step,date,starttime,endtime,progress,activity,line,description,country) values ('" & TimeTracking.Form1.user.Text & "','" & TimeTracking.Form1.TextBox5.Text & "','" & TimeTracking.Form1.ComboBox3.Text & "','" & TimeTracking.Form1.DateTimePicker1.Text & "','" & TimeTracking.Form1.starttime.Text & "','" & TimeTracking.Form1.endtime.Text & "','" & TimeTracking.Form1.TextBox1.Text & "','" & TimeTracking.Form1.ComboBox5.Text & "','" & TimeTracking.Form1.TextBox2.Text & "','" & TimeTracking.Form1.TextBox4.Text & "','" & TimeTracking.Form1.TextBox3.Text & "')"
Dim sqlcommand As New MySqlCommand
With sqlcommand
.CommandText = sqlquery
.Connection = sconnection
.ExecuteNonQuery()
End With
Dim sqlid As String = "SELECT registro.id FROM registro"
Dim id As New MySqlCommand
With id
.CommandText = sqlid
.Connection = sconnection
.ExecuteNonQuery()
End With
End With
Me.Close()
Best Regards!:wave: