[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Postgre y TCL/TK



Esto es en un Debian Papa, en el manual de postgres esta los comandos de tcl

# Se carga la libreria para PGSQL
load /usr/lib/postgresql/lib/libpgtcl[info sharedlibextension]
# se conecta con la bd
set conn [pg_connect smandra -port 5432]
# se guarda el numero de la factura
set res [ pg_exec $conn " SELECT nfact  FROM nfact ORDER BY nfact " ]
set nfact [ pg_result $res -getTuple 0 ]
pg_result $res -clear
pg_disconnect $conn


Suerte




Reply to: