When the user has filled out the form and submitted the purchase order, IDC must execute an INSERT query to save the record in the bookstor.mdb database. The data is stored in the Customers table, from which you can access the data and fill the order. When the order has been received, a confirmation screen is displayed to the user.
The only step in this section creates the idc file for the INSERT query. The file will be saved as purchase.idc. Open a new document in your text editor, add the following code, and save the file in the \scripts\project3 folder with the rest of your idc files:
DataSource:Bookstore
Template:c:\inetsrv\scripts\project3\purchase.htx
SQLStatement:
+INSERT INTO Customers
+(Name,Company,Address,City,State,Zip,CardType,
+CardNumber,ExpDate,Email,Title)
+VALUES
+('%txtName%','%txtCompany%','%txtAddress%',
+'%txtCity%','%txtState%','%txtZip%',
+'%optCardType%','%txtCardNumber%',
+'%txtExpDate%','%txtEmail%','%txtTitle%')