From: Marko Ristola <marko.ristola@kolumbus.fi>
To: pgsql-odbc@postgresql.org
Subject: Re: Bound column and serial datatype question
Date: Sat, 23 Apr 2005 09:57:11 +0300
Message-ID: <4269F1C7.7090906@kolumbus.fi> (raw)
In-Reply-To: <4264FEFB.10829.EB6968@localhost>
References: <4264FEFB.10829.EB6968@localhost>
If you remove the NOT NULL definition from the CustomerNr,
you can put there a NULL value too.
The SQL email list is better for these questions, because they have
more knoledge of these kinds of problems ...
(The CustomerNr and ID columns seem to have redundant information.)
Regards,
Marko Ristola
lothar.behrens@lollisoft.de wrote:
>Hi,
>
>I have a table like this:
>
>CREATE TABLE Kunden
>(
> ID serial NOT NULL,
> CustomerNr serial NOT NULL,
> Name CHAR(100),
> ...
>);
>
>Using bound columns in a form to show the customer data I don´t like to let the user
>updating the CustomerNr field. This is because, a normal data field is not
>autogenerated, but these 'serial' data fields.
>
>But I like to show the CustomerNr field in the form. Therefore, I simply made the
>field readonly in the form. But if I insert a new row, the fields data (defaults to 0)
>would be used as the new value in the table.
>
>How to avoid this ?
>
>Thanks
>
>Lothar
>
>--
>Lothar Behrens www.lollisoft.de
>Rosmarinstr 3 My public project:
>40235 Düsseldorf http://sourceforge.net/projects/lbdmf
>
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 8: explain analyze is your friend
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: marko.ristola@kolumbus.fi
Subject: Re: Bound column and serial datatype question
In-Reply-To: <4269F1C7.7090906@kolumbus.fi>
References: <4264FEFB.10829.EB6968@localhost> <4269F1C7.7090906@kolumbus.fi>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox