Discussion:
IBSQL Update duplicating records
(too old to reply)
Mortein
2007-01-17 13:55:41 UTC
Permalink
Hi, after update one record, using IBSQL component,
the record is duplicated. Why?

PS: What configuration i need use to transaction component?
Wayne Niddery [TeamB]
2007-01-17 15:12:42 UTC
Permalink
Post by Mortein
Hi, after update one record, using IBSQL component,
the record is duplicated. Why?
That cannot happen unless you are executing an insert instead of an update
statement. You'll need to show your code. Also, you should have a primary
index on your table so, if an attempt is made to add a duplicate, Interbase
will raise an exception that you can trap.
Post by Mortein
PS: What configuration i need use to transaction component?
If you are successfully executing statements with IBSQL then you must
already have both an IBDatabase and IBTransaction component hooked up. All
you need to do is call IBTransaction.StartTransaction and then either
IBTransaction.Commmit or Rollback.
--
Wayne Niddery - Winwright, Inc (www.winwright.ca)
"A man is likely to mind his own business when it is worth minding,
when it is not, he takes his mind off his own meaningless affairs by
minding other people's business." - Eric Hoffer
Mortein
2007-01-17 19:19:55 UTC
Permalink
Thanks, but only thing possible is create the primary key on the table. The
code is correct!
Thanks Wayne
Post by Wayne Niddery [TeamB]
Post by Mortein
Hi, after update one record, using IBSQL component,
the record is duplicated. Why?
That cannot happen unless you are executing an insert instead of an update
statement. You'll need to show your code. Also, you should have a primary
index on your table so, if an attempt is made to add a duplicate, Interbase
will raise an exception that you can trap.
Post by Mortein
PS: What configuration i need use to transaction component?
If you are successfully executing statements with IBSQL then you must
already have both an IBDatabase and IBTransaction component hooked up. All
you need to do is call IBTransaction.StartTransaction and then either
IBTransaction.Commmit or Rollback.
--
Wayne Niddery - Winwright, Inc (www.winwright.ca)
"A man is likely to mind his own business when it is worth minding,
when it is not, he takes his mind off his own meaningless affairs by
minding other people's business." - Eric Hoffer
Mortein
2007-01-17 20:07:18 UTC
Permalink
Thank you again Wayne, after create a Primary Key on table, the update
action (using IBSQL) work correctly. In other words, the record don't appear
duplicated and no error is generated !
Thank's
Mortein
Post by Wayne Niddery [TeamB]
Post by Mortein
Hi, after update one record, using IBSQL component,
the record is duplicated. Why?
That cannot happen unless you are executing an insert instead of an update
statement. You'll need to show your code. Also, you should have a primary
index on your table so, if an attempt is made to add a duplicate, Interbase
will raise an exception that you can trap.
Post by Mortein
PS: What configuration i need use to transaction component?
If you are successfully executing statements with IBSQL then you must
already have both an IBDatabase and IBTransaction component hooked up. All
you need to do is call IBTransaction.StartTransaction and then either
IBTransaction.Commmit or Rollback.
--
Wayne Niddery - Winwright, Inc (www.winwright.ca)
"A man is likely to mind his own business when it is worth minding,
when it is not, he takes his mind off his own meaningless affairs by
minding other people's business." - Eric Hoffer
Loading...