1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Try
Dim ident As String
Dim path As String = "d:\esavt.txt"
Dim sr As StreamReader = New StreamReader(path)
Do While sr.Peek() >= 0
ident = sr.ReadLine()
Dim query As String = "UPDATE films SET MediaType = 'URL' WHERE ID ='" & ident & "'" 'Requête SQL
Dim connection As New MySqlConnection("server= 127.0.0.1;user id= root ; password=; database=film")
Dim cmd As New MySqlCommand(query, connection)
connection.Open()
MsgBox(ident)
connection.Close()
Loop
sr.Close()
Catch ex As MySqlException
MsgBox(ex.Message)
End Try |