0
に3テキストボックスの値を入力します。これは、私が.NETで非常に簡単だ1フィールド名はどのように1つのフィールド名
Try
MysqlConn.Open()
Dim Query As String
Query = "INSERT INTO residentrecords.info (id,last_name,first_name,middle_name,age,address,contact_no,date_of_birth,religion,civil_status,education_attainment,occupation,fathers_name,mothers_name,mothers_occupation,fathers_occupation,gender,purok,blotter,docu,voter) values ('" & add.TextBox_ID.Text & "','" & add.TextBox_LN.Text & "','" & add.TextBox_FN.Text & "','" & add.TextBox_MN.Text & "','" & add.TextBox_Age.Text & "','" & add.TextBox_Address.Text & "','" & add.TextBox_Contact.Text & "','" & add.DateTimePicker1.Text & "','" & add.ComboBox_religion.Text & "','" & add.ComboBox_CS.Text & "','" & add.TextBox_Educ.Text & "','" & add.TextBox_Occu.Text & "','" & add.TextBox1_FathersName.Text & "','" & add.TextBox1_MothersName.Text & "','" & add.TextBox_mothersocc.Text & "','" & add.TextBox_fathersocc.Text & "','" & add.ComboBox_gender.Text & "','" & add.rpurok.Text & "','0','0','" & add.voter.Text & "')"
COMMAND = New MySqlCommand(Query, MysqlConn)
READER = COMMAND.ExecuteReader
MessageBox.Show("Successfully Registered!", "REGISTERED", MessageBoxButtons.OK, MessageBoxIcon.None)
If vbOK = MsgBoxResult.Ok Then
Me.Dispose()
add.Dispose()
add.Enabled = True
residents.Show()
End If
MysqlConn.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
MysqlConn.Dispose()
End Try
End Sub
あなたのDBにはそれぞれの列があるようですが、どうしてそれらを連結したいのですか?しかし、それはSQLを作成する正しい方法ではありません。 DBパラメータを使用して[ask]を読んで[ツアー] – Plutonix
を参照してくださいhttps://stackoverflow.com/a/12634626/880990 –
こんにちはオリビエはお返事ありがとうございます。 https://prnt.sc/hcwlvt –