hi, i have created a database on microsoft access 2003.
I have created a website in asp.net( visual basic). I have a page on the website where customers can make an order.
there is a customer table and a order table in my database. The way i have done is is i have created a text box for each attribute and a button. once the fields are filled out and the butoon clicked the records are updated in the database.
however the problem is i can only enter data into one table. e.g the customer name, address, tel no etc is entered and when buton clicked data is updated in the database. but how can i enter data into 2 diffrent tables at once with the click of one button.
This is the code that i use to enter data to one table, what i want to do is add data to two tables that are in a relationship:
Public strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & Server.MapPath("Customer.mdb")
Protected Sub submit1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles submit1.Click
Dim cmd As New OleDbCommand("INSERT INTO Customer(Name,EMailAddress)VALUES('" & name.Text & "','" & email.Text"')", New OleDbConnection(strConn))
I would be very greatful for your help and would like to thank you a million in advance.