Page 1 of 1

Multiple records found...

Posted: Thu Dec 09, 2010 4:54 pm
by Ceprotec
Hi Sergey!

I'm having a big problem in the second recording, that is, at first he set up right and generates the code to the next but it appears the error: Multiple records found, But only one was expected!

In my bank oa var Code is primary key and AutoincField. Use the following code:

TableEncerramentoLivros.Close;
TableEncerramentoLivros.Open;
TableEncerramentoLivros.Insert;
TableEncerramentoLivrosTIPO.AsInteger: = tipo.ItemIndex;
TableEncerramentoLivrosDESCRICAO.AsString: = descricao.Text;
TableEncerramentoLivrosTIPO_ES.AsString: = tipo.Text;
Stream: = TableEncerramentoLivros.CreateBlobStream (TableEncerramentoLivrosMODELO, bmWrite);
SRichViewEdit1.RichViewEdit.SaveRVFToStream (Stream, False);
Stream.Free;
TableEncerramentoLivros.Post;

I've tried using TableEncerramentoLivros.Next, but also not worked. What can I do?

Posted: Thu Dec 09, 2010 5:46 pm
by Sergey Tkachenko
Is this problem really related to RVF field? If you remove the code for saving TableEncerramentoLivrosMODELO, does the problem still exist?
May be you have some key fields that must have unique values?