 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Man Utd Guest
|
Posted: Mon Nov 21, 2005 12:00 am Post subject: Firebird Autoincrement |
|
|
Using EMS Manager.
When I create a table, primary key field eg. ID, define it using the
Standard data type, INTEGER.
Then goto Autoincrement tab to create a new Generator with initial value 1.
However, I tried to add a new record on the Data tab, if I didn't enter the
ID filed, I got an error when save.
That means I need to enter the ID field manually. Why ? Isn't the generator
will generate the ID for me ?
|
|
| Back to top |
|
 |
Bill Todd Guest
|
Posted: Mon Nov 21, 2005 12:37 am Post subject: Re: Firebird Autoincrement |
|
|
You seem to be having a lot of problems that relate to EMS Manager. You
might get better help on their suppor forum.
--
Bill Todd (TeamB)
|
|
| Back to top |
|
 |
*Lysander* Guest
|
Posted: Mon Nov 21, 2005 9:13 am Post subject: Re: Firebird Autoincrement |
|
|
In article <43810de9 (AT) newsgroups (DOT) borland.com>,
[email]alanpltseNOSPAM (AT) yahoo (DOT) com.au[/email] says...
| Quote: | However, I tried to add a new record on the Data tab, if I didn't enter the
ID filed, I got an error when save.
|
In addition to what Bill wrote, you only got half the rent paid by now.
A generator does not fire by its own whenever any table needs to be
incremented. You also should have something like a trigger on that same
table.
Something that tells the server "if I will add a new record on table
this_table and I am leaving field this_field empty|null, then please get
a new id from generator this_generator and place it into the field for
me".
I don't know what EMS is, but - for example - IBExpert has a wizard that
will also create the necessary trigger for you.
--
ciao,
André
|
|
| Back to top |
|
 |
Man Utd Guest
|
Posted: Thu Nov 24, 2005 10:17 am Post subject: Re: Firebird Autoincrement |
|
|
Yes, the EMS also has this Trigger and Stored Procedure attached to the
generator.
"*Lysander*" <nobody (AT) nowhere (DOT) com> wrote
In article <43810de9 (AT) newsgroups (DOT) borland.com>,
[email]alanpltseNOSPAM (AT) yahoo (DOT) com.au[/email] says...
| Quote: | However, I tried to add a new record on the Data tab, if I didn't enter
the
ID filed, I got an error when save.
|
In addition to what Bill wrote, you only got half the rent paid by now.
A generator does not fire by its own whenever any table needs to be
incremented. You also should have something like a trigger on that same
table.
Something that tells the server "if I will add a new record on table
this_table and I am leaving field this_field empty|null, then please get
a new id from generator this_generator and place it into the field for
me".
I don't know what EMS is, but - for example - IBExpert has a wizard that
will also create the necessary trigger for you.
--
ciao,
André
|
|
| Back to top |
|
 |
Man Utd Guest
|
Posted: Thu Nov 24, 2005 10:23 am Post subject: Re: Firebird Autoincrement |
|
|
Ah,
I also tried the IBExpert then, I created the Trigger successfully. (Commit
that)
BUT, then I reopen the table, edit the field, click the "Autoincrement" tab
found that the "Create Generator" and "Use existing generator" both
unchecked. Why ? I chosed "Use existing generator" before. And it also the
same in the "Trigger" tab with "Create Trigger" unchecked.
"Man Utd" <alanpltseNOSPAM (AT) yahoo (DOT) com.au> wrote
| Quote: | Yes, the EMS also has this Trigger and Stored Procedure attached to the
generator.
"*Lysander*" <nobody (AT) nowhere (DOT) com> wrote in message
news:MPG.1debae0e368399ae9896dc (AT) newsgroups (DOT) borland.com...
In article <43810de9 (AT) newsgroups (DOT) borland.com>,
[email]alanpltseNOSPAM (AT) yahoo (DOT) com.au[/email] says...
However, I tried to add a new record on the Data tab, if I didn't enter
the
ID filed, I got an error when save.
In addition to what Bill wrote, you only got half the rent paid by now.
A generator does not fire by its own whenever any table needs to be
incremented. You also should have something like a trigger on that same
table.
Something that tells the server "if I will add a new record on table
this_table and I am leaving field this_field empty|null, then please get
a new id from generator this_generator and place it into the field for
me".
I don't know what EMS is, but - for example - IBExpert has a wizard that
will also create the necessary trigger for you.
--
ciao,
André
|
|
|
| Back to top |
|
 |
klemmo Guest
|
Posted: Thu Nov 24, 2005 11:06 am Post subject: Re: Firebird Autoincrement |
|
|
Man Utd schrieb:
| Quote: | Ah,
I also tried the IBExpert then, I created the Trigger successfully. (Commit
that)
BUT, then I reopen the table, edit the field, click the "Autoincrement" tab
found that the "Create Generator" and "Use existing generator" both
unchecked. Why ? I chosed "Use existing generator" before. And it also the
same in the "Trigger" tab with "Create Trigger" unchecked.
|
Hi,
try to use our newsserver news://ibexpert.info/interbase.ibexpert.en
for questions regarding ibexpert specific issues
Holger Klemt
The IBExpert Team
www.ibexpert.com
|
|
| Back to top |
|
 |
*Lysander* Guest
|
Posted: Thu Nov 24, 2005 12:45 pm Post subject: Re: Firebird Autoincrement |
|
|
In article <4385941a (AT) newsgroups (DOT) borland.com>,
[email]alanpltseNOSPAM (AT) yahoo (DOT) com.au[/email] says...
| Quote: | Ah,
I also tried the IBExpert then, I created the Trigger successfully. (Commit
that)
BUT, then I reopen the table, edit the field, click the "Autoincrement" tab
found that the "Create Generator" and "Use existing generator" both
unchecked. Why ? I chosed "Use existing generator" before. And it also the
same in the "Trigger" tab with "Create Trigger" unchecked.
|
questions about the usability of this product should go to the producer
itself ([url]www.ibexpert.com)[/url]. I think they made it this for a purpose.
The syntax is correct. It asks if you want to create ANOTHER trigger.
If you will look on the "trigger" tab of the table (not in the field-
constructor) then you will find your already existing trigger there.
--
ciao,
André
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|