Delete Record From Multiple Tables witn Same ID in MySQL using VB.NET - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Delete Record From Multiple Tables witn Same ID in MySQL using VB.NET

kreahguiled101kreahguiled101 Posts: 2Member
I use listview and button the scenario is when i choose data in the listview it will delete all the record with the same id in many tables and i use ODBC

[code]
con.Open()
Dim cmd As New Odbc.OdbcCommand("DELETE FROM patientpersonal,patientmedical,patientdental WHERE patientpersonal.'" & dpatientid & "' = patientmedical.'" & dpatientid & "' AND patientpersonal.'" & dpatientid & "' = patientdental.'" & dpatientid & "' ", con)
cmd.ExecuteNonQuery()
con.Close()
Call DisplayDentalPatient()
[/code]
Sign In or Register to comment.