<%@ taglib uri="http://jakarta.apache.org/taglibs/jdbc" prefix="sql" %>

Opening connection

<%=request.getParameter("dburl")%> <%=request.getParameter("driver")%>

Connection is closed?

Deleteing the results of the last test

delete from test_books where id > 2

Showing current contents of the "test_books" table

select id, name, description from test_books order by 1
idnamedescription
[no description]

Inseting a row using the "statement" tag

insert into test_books (id, name) values (3, 'Gravity's Rainbow')

Showing current contents of the "test_books" table

select id, name, description from test_books order by 1
idnamedescription
[no description]

Selecting back the title of book 3, assigning the value to an attribute

select name from test_books where id = 3 order by 1

Inserting that title into a new row with a "preparedStatement" tag, adding a description

insert into test_books (id, name, description) values (?, ?, ?) The contents of an execute body are not included in the output 4 book by Pynchon

Showing current contents of the "test_books" table

select id, name, description from test_books order by 1
idnamedescription
[no description]

Closing the database connection

Connection is closed?

Success!