PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Creating tables in PostgreSQL from Windev
Creating tables in PostgreSQL from Windev
Iniciado por guest, 05,sep. 2017 06:27 - 4 respuestas
Publicado el 05,septiembre 2017 - 06:27
Hello All:

I have an application working with HFSQL classic files and I need to switch to PostgreSQL.
Since the analysis is already created and all tables are defined; is there a way to create those tables in PostgreSQL from Windev? Or any way of generating the SQL to run in the database and create the tables?

Thanks
Michael
Publicado el 05,septiembre 2017 - 09:35
Hi Michael,

In the Analysis from one of the menus you can generate the SQL generation script for specific databases.

Note that for some databases you may need to alter the generated script a bit. Don't recall what exactly was the issue (might have been unicode or constraints or so). At least that used to be the case in older WX versions (V18/V19) for MS SQL Server.
Raised a call for that back in the days and if I recall correctly it was more or less solved in later releases (no patch).

Don't have WX at hand here but you should be able to find it in the Analysis menu/ribbon somewhere under the generation options.

Cheers,

Peter
Publicado el 05,septiembre 2017 - 13:15
Hi,

Usually if the (empty) database is created and is connected you can do a HCreationIfNotFound("*") and all your tables shuld be created in Postgre/MS-SQL etc.

Cheers
Tor-Bjarne
Publicado el 05,septiembre 2017 - 16:04
Tor is correct, i have played about with PostgreSQL and it worked very well. hcreateIfNotFound did create the tables if the database exists.

One thing i found is that the automatic analysis update didn't work if you change a table (add a new field/index etc) like it does with HFSQL - unless anyone has found a way of getting it working or a work around

Regards

Dave
Publicado el 05,septiembre 2017 - 19:30
Hello Peter:

Thanks. I couldn't find those scripts...

Tor-Bjarne:
Thanks. This worked well.

Regards;
Michael