[Gambas-user] Problem with Postgresql

Ron Onstenk ronstk at ...239...
Mon Jul 10 11:32:36 CEST 2006


On Sunday 09 July 2006 19:58, rolf wrote:
> - CODE:  
>   query1 = "alter table _" & TextBox.Text & " add column id serial not null"  
>   res1 = hDB.Exec(quer

> if a primary key should be set with a code like: 
>     query1 = "ALTER TABLE ONLY _" & TextBox.Text &
>                      " ADD CONSTRAINT X" & TextBox.Text & 
>                      "_pkey PRIMARY KEY (id)"
>    res1 = hDB.Exec(query1)
> 

What are those underscores?

In example on postgres site: 'ALTER TABLE table_name ADD'

Leave those underscore away or do you have really a table starting with '_' ?

" ADD CONSTRAINT X" & TextBox.Text & "_pkey PRIMARY KEY (id)"
This looks as 'CONSTRAINT Xmyname_pkey PRIMARY' are you sure this correct?

Maybe also case sensitive can be a problem.

Ron




More information about the User mailing list