ADO TutorialLesson 67Free preview
ADO Add
This lesson is part of ASP · All levels
Summary
Adding new data is done by using the INSERT INTO query that lists the column and its value, or by using the AddNew method on the Recordset. The value of the text should be quoted in a single quotation and the number written as it is. If the table has a mandatory column, make sure the value is provided so that storage does not fail.
Key points
- INSERT INTO name (column) VALUES (value) is a standard addition query form.
- Recordset can also add a line with AddNew followed by Update.
- Always include a mandatory column to meet constraints.
- IDENTITY The last line on SQL Server can be read as SCOPE_IDENTITY().
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.