or, don't make the username a unique constraint. it is logically incorrect.
one give username can have more than one error ;)
Main Topics
Browse All TopicsI'm trying to insert this information on my database:
here is the values that is not work.
E.message =
Key violation.
Violation of UNIQUE KEY constraint 'IX_TB_USER_NOME'. Cannot insert duplicate key in object 'TB_USER'.
the active form caption is Clientes
the form name is FUser_Ficha
the active control is BitBtn2
that's my code:
BD.SQLErro.InsertSQL.Clear
BD.SQLErro.InsertSQL.Add('
BD.SQLErro.InsertSQL.Add('
BD.SQLErro.InsertSQL.Add('
BD.SQLErro.InsertSQL.Add('
BD.SQLErro.InsertSQL.Add('
BD.SQLErro.InsertSQL.Add('
BD.SQLErro.InsertSQL.Add('
BD.SQLErro.InsertSQL.Add('
BD.Query_Erro.Insert;
BD.Query_Erro.ApplyUpdates
BD.SQLErro.InsertSQL.Clear
That's the error message when I try to insert:
Incorrect syntax near by 'IX_TB_USER_NOME'
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
that's other question.
that code is type on object tapplicationevents1 on event onexception.
here:
procedure TFPrinc.ApplicationEvents1
E: Exception);
begin
Historico.Lines.Add('/////
Historico.Lines.Add(E.Mess
Historico.Lines.Add(Screen
historico.Lines.Add(screen
historico.Lines.Add(screen
Historico.Lines.Add('/////
BD.SQLErro.InsertSQL.Clear
BD.SQLErro.InsertSQL.Add('
BD.SQLErro.InsertSQL.Add('
BD.SQLErro.InsertSQL.Add('
BD.SQLErro.InsertSQL.Add('
BD.SQLErro.InsertSQL.Add('
BD.SQLErro.InsertSQL.Add('
BD.SQLErro.InsertSQL.Add('
BD.SQLErro.InsertSQL.Add('
BD.Query_Erro.Insert;
BD.Query_Erro.ApplyUpdates
BD.SQLErro.InsertSQL.Clear
end;
Business Accounts
Answer for Membership
by: ciulyPosted on 2006-08-12 at 13:12:28ID: 17303155
as sun4day suggested in the other question, you are trying to insert a username that already is inserted.
as a resolution, you can ignore the error and let the user know that the value alreadz exists, or, you can catch the error and in the exception part update the row with the new values. it depends on youir application logic