12.07.2015 Views

Module 13 (Introduction to SQL - Part 2).pdf

Module 13 (Introduction to SQL - Part 2).pdf

Module 13 (Introduction to SQL - Part 2).pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

One ApproachFirst collect the new data from the user as as resul<strong>to</strong>f the user filling in a CGI-based form.With that data, build up the above INSERT querypiece by piece by concatenating all the data items(as strings) the user entered in.• The StringBuilder class may be more convenient for this.Once the string is ready, pass it <strong>to</strong> the appropriatedatabase component <strong>to</strong> cause this record <strong>to</strong> beinserted in<strong>to</strong> the desired table.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!