🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.multi-tier
5 messages
5 total messages Started by Nuno Miguel da Silva Santos Sun, 18 Jun 2000 00:00
sql problem
#1094
Author: Nuno Miguel da Silva Santos
Date: Sun, 18 Jun 2000 00:00
8 lines
905 bytes
i have a sql database. the primary key is auto-increment.
in the builder aplication for this database, when i try to insert one
registry it return the folowing error, the field IDCLIENTE must have a
value, how can i solve this.

other question, i'm trying to see some of my table fields with dblistbox
(one listbox for each field) but i can't see any registry, how can i solve
this
Re: sql problem
#1095
Author: Jerry Bloomfield (TeamB)
Date: Sun, 18 Jun 2000 00:00
17 lines
1364 bytes
On Sun, 18 Jun 2000 14:56:58 +0100, "Nuno Miguel da Silva Santos"
<inf02794@alunos.est.ipcb.pt> wrote:

>i have a sql database. the primary key is auto-increment.
>in the builder aplication for this database, when i try to insert one
>registry it return the folowing error, the field IDCLIENTE must have a
>value, how can i solve this.
When you post your insert into the database what value do you put into the
IDCLIENTE field?  From the error message,  I would guess that you do not
put a value,  and the edit check sees that there is a null value in a
required field.

Jerry Bloomfield (TeamB)
-- 
http://www.teamb.com                                      JersWork@wwa.com
Please do *NOT* send private e-mail without prior permission (my anti-spam 
filters will probably just delete it anyway <g>)
Re: sql problem
#1096
Author: Jeff Overcash (TeamB)
Date: Sun, 18 Jun 2000 00:00
22 lines
1629 bytes
Instantiate all the TFields for that query at design time and set the required
property for that field to false.

Nuno Miguel da Silva Santos wrote:
> 
> i have a sql database. the primary key is auto-increment.
> in the builder aplication for this database, when i try to insert one
> registry it return the folowing error, the field IDCLIENTE must have a
> value, how can i solve this.
> 
> other question, i'm trying to see some of my table fields with dblistbox
> (one listbox for each field) but i can't see any registry, how can i solve
> this

-- 
Jeff Overcash (TeamB)   
  (Please do not email me directly unless asked.  Thank You)     
A spider wanders aimlessly within the warmth of a shadow, not the regal creature
of border caves, but the poor, misguided, directionless familiar of some obscure
Scottish poet.  The mist crawls from the canal like some primordial phantom of
romance To curl, under the cascade of neon pollen.  While I sit tied to the
phone like some expectant father, your carnation will rot in a vase.  (Fish)
Re: sql problem
#1101
Author: Nuno Miguel da Silva Santos
Date: Mon, 19 Jun 2000 00:00
27 lines
1891 bytes
i do not put a value in idcliente because it is auto-increment in sql, so i
do not want to put a value but i want that the value to appear automaticaly.
i thinhk that the problem is that i use the dbnavigator, how can i use sql
commands, bacause i want to click a button to confirm the insertion off a
registry into the database.


Jerry Bloomfield (TeamB) <JersWork@wwa.com> wrote in message
news:ppoqksgrr5ibpmrksba13dvd0450mj5i1c@4ax.com...
> On Sun, 18 Jun 2000 14:56:58 +0100, "Nuno Miguel da Silva Santos"
> <inf02794@alunos.est.ipcb.pt> wrote:
>
> >i have a sql database. the primary key is auto-increment.
> >in the builder aplication for this database, when i try to insert one
> >registry it return the folowing error, the field IDCLIENTE must have a
> >value, how can i solve this.
>
> When you post your insert into the database what value do you put into the
> IDCLIENTE field?  From the error message,  I would guess that you do not
> put a value,  and the edit check sees that there is a null value in a
> required field.
>
> Jerry Bloomfield (TeamB)
> --
> http://www.teamb.com                                      JersWork@wwa.com
> Please do *NOT* send private e-mail without prior permission (my anti-spam
> filters will probably just delete it anyway <g>)
Re: sql problem
#1104
Author: Jeff Overcash (TeamB)
Date: Tue, 20 Jun 2000 00:00
26 lines
2058 bytes
Like I said in my other post, you need to set the Required property for the
TField for that column to false.  This stops the client side validation for that
field.  The problem is not in the DBNavigator.  The problem is that when TQuery
reads the properties for each field your DB backend returns that IDCLIENTE is a
required field, so a validation error will result before anything is even sent
to the DB if the field is NULL, turning off Required for that field will stop
the client side check and let the server fill it out for you.

Nuno Miguel da Silva Santos wrote:
> 
> i do not put a value in idcliente because it is auto-increment in sql, so i
> do not want to put a value but i want that the value to appear automaticaly.
> i thinhk that the problem is that i use the dbnavigator, how can i use sql
> commands, bacause i want to click a button to confirm the insertion off a
> registry into the database.
> 


-- 
Jeff Overcash (TeamB)   
  (Please do not email me directly unless asked.  Thank You)     
A spider wanders aimlessly within the warmth of a shadow, not the regal creature
of border caves, but the poor, misguided, directionless familiar of some obscure
Scottish poet.  The mist crawls from the canal like some primordial phantom of
romance To curl, under the cascade of neon pollen.  While I sit tied to the
phone like some expectant father, your carnation will rot in a vase.  (Fish)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads