i have a simple query, i have data sent to another form, and then the data values sent to the other form are then saved to one of my database tables.
the first connection to the first table works fine, however i need to send the remaining data to the remaining 2 tables.
here is the code that seems to be working fine when connected to one table
hope this helps thankyou
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
'Create Connection for customer table'
Dim Conn As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Sahir Osman\My Documents\Business I.T Year 2\test\executivetravel.mdb")
Conn.Open()
Dim Command As New System.Data.OleDb.OleDbCommand("insert into Customer(firstname, surname, dateofbirth, telephone, email, passportno )values('" & lblfirstname.Text & "', '" & lblsurname.Text & "', '" & lblDOB.Text & "', " & lblcontact.Text & ", '" & lblemail.Text & "', " & lblpassport.Text & " )", Conn)
Command.ExecuteNonQuery()
Conn.Close()
End Sub
End Class

New Topic/Question
Reply




MultiQuote





|