[Gambas-user] Problem with the EXEC[] function

Benoit Minisini gambas at ...1...
Tue Mar 8 12:13:46 CET 2005


On Monday 07 March 2005 19:56, Rolf Schmidt wrote:
> Hi  Benoit Minisini:
> > > I'm going to handle the database setup outside of my gambas programm -
> > > and wait, until you find a solution for the EXEC-problem (or the
> > > database interface becomes better).
> > >  - Even with #hDB.exec("create table table (id serial primary
> > > key,...)") problems arise, because postgresql gives a warning on
> > > stderr.
>
> []
>
> > Tell me which warning: I think it should not be a problem at all. Just a
> > warning message.
>
> psql:pgdatabase:2: HINWEIS:  CREATE TABLE / PRIMARY KEY erstellt implizit
> einen Index »klassifikation_pkey« für Tabelle »klassifikation«
>
> This means:
> psql:pgdatabase:2:WARNING:  CREATE TABLE / PRIMARY KEY creates implizit
> Index  »klassifikation_pkey« for table  »klassifikation«
>
> This message(s) arise, if a table field is defined to be "serial" which
> means auto incremental.
>
> BTW: I have another problem with this -> I get an error from gambas if
> there is no value for an autoincremented field which is by default defined
> not to be null!
> So I have to use the #hDB.Exec-function to generate the insert command.
> What a pitty.
>
> Regards
> Rolf

The database component does not manage auto-increment field. So it tries to 
insert a value in it...

It is not completely incoherent, because if you use Exec to create tables and 
so on, you bypass the database component, so you can have problems with 
Update, Edit, Delete...

Maybe in a future version of the database component auto-increment fiels 
should be managed...

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list