1. RE: EUSQL get_next_autonumber
sixs at ida.net wrote:
>
>
> I am trying to have a table with an automatic number key and I found
> this function in eusql.e. Is that the proper use of this function?
> jim
>
I'm not sure how it is that you are using it. The proper way to use
AUTONUMBERs in EuSQL is to create a field of that data type. It may be
the primary key or any other field. From the user's point of view, this
field is read only. If you try to change the value, you'll get an
error. EuSQL will automatically assign the next number in sequence
whenever you create a new record. The function, get_next_autonumber()
is there for convenience, in case there is some reason why you might
need to know what the next number will be.
Matt Lewis
2. RE: EUSQL get_next_autonumber
Matt,
Are you saying that EUSQL will assign a Key number to the record if I
want it to have integer numbers? If I want an key made of alpha values,
say a persons initials, that I can do that?
Jim
-----Original Message-----
From: Matt Lewis [mailto:matthewwalkerlewis at yahoo.com]
Subject: RE: EUSQL get_next_autonumber
sixs at ida.net wrote:
>
>
> I am trying to have a table with an automatic number key and I found
> this function in eusql.e. Is that the proper use of this function?
> jim
>
I'm not sure how it is that you are using it. The proper way to use
AUTONUMBERs in EuSQL is to create a field of that data type. It may be
the primary key or any other field. From the user's point of view, this
field is read only. If you try to change the value, you'll get an
error. EuSQL will automatically assign the next number in sequence
whenever you create a new record. The function, get_next_autonumber()
is there for convenience, in case there is some reason why you might
need to know what the next number will be.
Matt Lewis
TOPICA - Start your own email discussion group. FREE!
3. RE: EUSQL get_next_autonumber
sixs wrote:
>
>
> Matt,
> Are you saying that EUSQL will assign a Key number to the record if
> I want it to have integer numbers? If I want an key made of alpha
> values, say a persons initials, that I can do that?
> Jim
EuSQL allows any values for the key (as long as they are unique, of
course). The AUTONUMBER data type is unique, in that you don't supply
the values. EuSQL stores the last number used, so that as each record
is created, a unique number is generated for that field, which can be
the primary key or any other field.
I think I may be releasing a new version of EuSQL (and EDB) this weekend
or early next week. Nothing major for EuSQL--some optimizations and a
couple of bug fixes. About the same for EDB.
Matt Lewis
4. RE: EUSQL get_next_autonumber
Matt,
I 'm having trouble with the sateement.
Is this sort of correct?
ok = run_sql( "CREATE TABLE counter CONT AS AUTONUMBER ")
Jim
-----Original Message-----
From: Matt Lewis [mailto:matthewwalkerlewis at yahoo.com]
Subject: RE: EUSQL get_next_autonumber
sixs wrote:
>
>
> Matt,
> Are you saying that EUSQL will assign a Key number to the record if
> I want it to have integer numbers? If I want an key made of alpha
> values, say a persons initials, that I can do that?
> Jim
EuSQL allows any values for the key (as long as they are unique, of
course). The AUTONUMBER data type is unique, in that you don't supply
the values. EuSQL stores the last number used, so that as each record
is created, a unique number is generated for that field, which can be
the primary key or any other field.
I think I may be releasing a new version of EuSQL (and EDB) this weekend
or early next week. Nothing major for EuSQL--some optimizations and a
couple of bug fixes. About the same for EDB.
Matt Lewis
TOPICA - Start your own email discussion group. FREE!