Michal wrote:
I am trouble maker because I wish it works my way.

Hi Michal,

Well - nothing wrong with that. First - I don't know if any of the developers will chime in here but perhaps I can help a little.

First - it would be nice to know which version of OOo and under which OS you are working, but I'll figure it is 2.3.1 for OOo.

Well, with database, I set up the table and have no problem to set the form
and queery, but have big problem with setting ID.
The best I got was auto incrementing ID where after first record ID 0001, I
got next record labelled 0011, or 0021.  Even when experimenting, I got 0,
1,2,3,4,5,3,4,5 and record autorepeated themselves or copied themselves
number of times. All sort of problems along with it.  Also despite creating
as I though an auto ID, I have managed to advance to the next record to
enter new data, and next but no ID was auto incremented nor anything visible
was inserted in that field.  The design of ID little function is useless to
me because it either waits for my commands which I do not know, or gives
some auto code which I assume produces an auto incrementing ID but it does
not.

Instead of answering this email here - sorry - I am going to take this chance to put a post ( a couple of posts actually ) at the User Community forum about these subjects. The first posts will be about auto_generated fields. Using the default database under Base HSQLdb you can do all that you are pointing to here. You can have values with leading zeros, you can have auto generated values with mixed string and incrementing numeric values - but you can't do it in the GUI table designer or the table wizard.

You will find the posts covering this at
http://user.services.openoffice.org/en/forum/viewforum.php?f=83 ( Getting Started - Tutorials - Base ) This is a brand new board on the forum and this will be the first entry...thanks by the way, I needed a shove actually - the Writer and Calc guys on the forum have already started. their entries..LOL
The starts of the entry is on the board now and will be finished tonight.

When I use wizard, the only way I can make a table is to pick any of the
template, and they all are quite remote from the table I want. There is no
option to chose my table minus ID, and then the wizard would create ID as it
should.  Is the a way around it?

hmmm - I use the table wizard all the time to create tables that are NOT based on the template tables. It has a few nice features over the designer. I also use the table templates a lot, mixing fields from multiple templates into single tables for instance, or just using subsets of fields from the templates. A second entry under Base Tutorial at the forum then will be on using the Table Wizard. ( Might be tonight, but no later then tomorrow mid-day for sure.. ps I am notoriously late...so if you want to see that an don't yell at me, OK )

Can I create the ID exactly as I want like just the incrementing numbers
with my initial value eg: 00001, and next to be 00002.
Or another style of ID: abc 001, abc 002, abc 003?
Yes - you can do this using a standard ALTER TABLE command, setting the DEFAULT to create the mixed value. Specifically you would have to create a SEQUENCE first and then use this in the default statement to build the fields value.

Can I modify my existing table to change just ID to my liking that is simple
numerical auto ID?

Yes - if you follow certain rules. - again you use the SQL standard ALTER TABLE ALTER COLUMN command for this.

A couple of other things -
Recently two new forums have started up on the User Community Forum Site -
A French language forum. ( http://user.services.openoffice.org/fr )
A Hungarian language forum ( http://user.services.openoffice.org/hu ) I know that a few of the folks on the Hungarian forum also speak Polish so you may want to check it out also.

and

You can find HSQLdb specific documentation for the ALTER TABLE and CREATE SEQUENCE commands at their web site - http://hsqldb.org

Drew

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to