Question
Inserting into Two Tables from one form
I have one form to capture customer information, which goes
into the customer table in a MS SQL Express 2005 database. On the
same form, I have booking information such as arrival date,
departure date, etc, that needs to update the booking table.
I have it so the booking update is completed first, what I need to do then is find some way using ColdFusion to get the booking id and then pass it to the customer table in order to add the data to the customer table.
I have tried using two SQL Insert statements and even two <cfinsert> queries but get the following error.
Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][SQL Native Client][SQL Server]Cannot insert the value NULL into column 'booking_id', table 'Rayanne.dbo.customer'; column does not allow nulls. INSERT fails.
Any ideas how I can get this sorted. I need the booking ID not to be null
I have it so the booking update is completed first, what I need to do then is find some way using ColdFusion to get the booking id and then pass it to the customer table in order to add the data to the customer table.
I have tried using two SQL Insert statements and even two <cfinsert> queries but get the following error.
Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][SQL Native Client][SQL Server]Cannot insert the value NULL into column 'booking_id', table 'Rayanne.dbo.customer'; column does not allow nulls. INSERT fails.
Any ideas how I can get this sorted. I need the booking ID not to be null