matthieu
Posts: 9
|
Posted: 04/16/2008, 11:42 AM |
|
Hello,
I try to do simple things to start with Codecharge, therefore I tried to create a record builder in order to enter data in my database.
I selected all the fields in order to be able to givea value to each of them, but then I select a Primary key from the table and when I finish to create the record builder, the primary key field has desapeared !
When I make a test to insert data in my database, it won't work because the primary key is necessary !
How can I take care of this issue ? Where is it possible to code an incrementation of the primary key depending of the last primary key entered ? Other solutions ?
TIA.
|
|
|
ReneS
Posts: 225
|
Posted: 04/16/2008, 12:07 PM |
|
Hi,
Primary key should disappear (i think). When using the record builder, it will identify your primary key (at least with mssqlserver) and there is no need to show it to the user, since your not allowed to manually change it.
Rene
|
|
|
matthieu
Posts: 9
|
Posted: 04/16/2008, 12:23 PM |
|
Hi Rene,
I agree with you that the primarykey should disappear. I'm using Sybase and when I submit what it only does is writting me an error message informing me that the primary key field cannot be left to NULL !
|
|
|
ReneS
Posts: 225
|
Posted: 04/16/2008, 12:55 PM |
|
Hi,
When starting the record builder, in first screen make sure that "auto increment primary key" is checked. In the following screen you can select your table for your records and set the wright field below that for primary key. Then everything should work.
Rene
|
|
|
matthieu
Posts: 9
|
Posted: 04/16/2008, 1:23 PM |
|
Thanks for the tips.... I think I have another problem to solve first (no right to INSERT !!!!) and then I'll check everything...
Have a good day.
|
|
|
wkempees
|
Posted: 04/18/2008, 3:24 AM |
|
although rene is right, and I do not have Sybase knowledge at hand, normaly
one creates a primary key at database level and defines that key to be not
null, autoincrement.
That way even if someone adds a row through the database interface (CLI) the
autoincrement is triggered correctly!
If recordbuilder is used on a table with autoincrementing primary key it
will use that
Walter
|
|
|
|