Hydrogen-terminated intrinsic diamond is a most unusual insulator since in contact with air or electrolyte it develops a hole accumulation layer just below the surface. When immersed in electrolyte the hole concentration responds to ionic charges and potentials and this response can be monitored by measuring the conductance of the hole accumulation layer without interference form the bulk conductivity. This feature has been widely used for chemical sensors in the form of solution-gate field effect transistors (SGFET). Here we analyze the charge and the potential profiles in the diamond and the electrolyte, as well as the static differential capacitance of the diamond electrode under controlled potential conditions. From this analysis we derive expressions for the transfer characteristics of diamond-based SGFET's that faithfully describe experimental data presented here as well. This holds in particular for the threshold region of the transfer characteristics that can only be modeled if the unusual semiconducting properties of the diamond electrode are taken into account properly. From fits to our data we derive (among other things) a value of chi=-0.50+/-0.02eV for the electron affinity of the hydrogen-terminated diamond surface in contact with aqueous electrolyte.