X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 00FD153F87 for ; Sat, 23 Apr 2005 03:57:28 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 43337-03 for ; Sat, 23 Apr 2005 06:57:18 +0000 (GMT) Received: from fep32-app.kolumbus.fi (fep32-0.kolumbus.fi [193.229.0.63]) by svr1.postgresql.org (Postfix) with ESMTP id 91E09537F6 for ; Sat, 23 Apr 2005 03:57:16 -0300 (ADT) Received: from [192.168.1.103] (really [84.231.185.8]) by fep32-app.kolumbus.fi with ESMTP id <20050423065716.KTBI17002.fep32-app.kolumbus.fi@[192.168.1.103]> for ; Sat, 23 Apr 2005 09:57:16 +0300 Message-ID: <4269F1C7.7090906@kolumbus.fi> Date: Sat, 23 Apr 2005 09:57:11 +0300 From: Marko Ristola User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050324 Debian/1.7.6-1 X-Accept-Language: en MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Re: Bound column and serial datatype question References: <4264FEFB.10829.EB6968@localhost> In-Reply-To: <4264FEFB.10829.EB6968@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.337 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200504/62 X-Sequence-Number: 5221 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 > >