protected void setProperty(Object object, String name, String value)
			throws SQLException {
		Class<?> type = object.getClass();

		PropertyDescriptor[] descriptors;
		try {
			descriptors = Introspector.getBeanInfo(type)
					                  .getPropertyDescriptors();
		} catch (Exception ex) {
			SQLException sqlException = new SQLException();
			sqlException.initCause(ex);
			throw sqlException;
		}
		List<String> names = new ArrayList<String>();

		for (int i = 0; i < descriptors.length; i++) {
			if (descriptors[i].getWriteMethod() == null) {
				continue;
			}

			if (descriptors[i].getName().equals(name)) {
				Method method = descriptors[i].getWriteMethod();
				Class<?> paramType = method.getParameterTypes()[0];
				Object param = toBasicType(value, paramType.getName());

				try {
					method.invoke(object, new Object[] {param});
				}
				catch (Exception ex) {
					SQLException sqlException = new SQLException();
					sqlException.initCause(ex);
					throw sqlException;
				}
				return;
			}

			names.add(descriptors[i].getName());
		}
		throw new SQLException("No such property: " + name +
							   ", exists.  Writable properties are: " + names);
	}