[erlang-questions] Mnesia Read/Write question.
Maria Christakis
el03665@REDACTED
Fri Jul 31 07:55:31 CEST 2009
Hello,
The problem probably is that your dirty_read/1 syntax is wrong.
dirty_read({Tab, Key})
So if
mnesia:dirty_read(test,Id)
works, you should try
mnesia:dirty_read({test,Id})
Maria
G.S. wrote:
> Hello everyone,
> This is probably a very stupid question/problem, but I'm having trouble
> using the following commands:
>
> A) mnesia:dirty_write(Id#test{item = hello}) and
> mnesia:dirty_read(Id#test.item) I get: exception error: {badrecord,test}
> but this works on the same table/schema...:
> B) Thing = #test{id = 1, item = hello}, mnesia:dirty_write(test,Thing),
> mnesia:dirty_read(test,Id).
>
> Are "A)" valid commands, what am I doing wrong?
>
> Regards,
> -Gene
>
>
More information about the erlang-questions
mailing list