// The validAdmin property is used to protect the Administrative pages client.validAdmin == "false" if(!database.connected()) database.connect("INFORMIX", "yourserver", "informix", "informix", "livewire") if (!database.connected()) write("Error: Unable to connect to database.") else { /* Below we find the highest customer ID and store it in a property we created called "lastID". Later, we will use this property to find the next available unique ID that we can use to add a new customer to the database. Notice how we lock the project object before we modify its properties, so we can protect it from corruption that may occur with simultaneous accesses. */ project.lock() project.lastID = 0 cursor = database.cursor("select MAX(id) from customer") cursor.next() project.lastID = cursor[0] project.unlock() cursor.close() redirect("home.htm") }