[erlang-questions] dets:info/2

Tim <>
Sun Jun 30 17:02:00 CEST 2013


Greetings,

Can anyone provide some example code of dets:info/2 in action that actually works?

I'm trying to get info on a dets table through a .yaws script and just can't get it to work.

<erl>
 out(Arg) ->
 	dets:open_file(ingredients, [{file,"ingredients.dets"},{type,set}]),
 	MyInfo = dets:info(ingredients,no_objects),
 	{html, MyInfo}.
</erl>

The error occurs on the {html, MyInfo} line - it appears to be unable to display the value.

My reading of the docs suggests that the return value of sets:info/2 is a simple value, but I suspect that it is not and have not yet worked out a way of visualising what sort of structure is being returned by the function.

Cheers.


More information about the erlang-questions mailing list