Обсуждение: Insert with ODBC Driver

Поиск
Список
Период
Сортировка

Insert with ODBC Driver

От
Luis Dolz
Дата:
Hi all:
I have the following problem
I generate programs in visual Fox using ODBC drivers, I can make execute remote consults with SQLEXEC, but I can't
insert records. The program is: 

STORE SQLCONNECT('PostgreSQL')  TO gnConnHandle
IF gnConnHandle <= 0
    MESSAGEBOX('No se puede conectar', 16, 'Error SQL')
ELSE
    CURSORSETPROP('UpdateType' , .T. , 'alumnos')       ** alumnos is a cursor
    SQLSETPROP(gnConnHandle, 'Transactions', 2)        ** set manual transactions
    SQLEXEC(gnConnHandle, "INSERT INTO datos VALUES (46, 'Dolz', 'Luis')") , 'alumnos')
    SQLCOMMIT(gnConnHandle)       ** Save changes
    SQLDISCONNECT(gnConnHandle)
ENDIF


If anyone works with Postgres(6.3.2) in Linux and Visual Fox in Windows and make data insertion with SQLEXEC, please
sendme the answer. 
Thanks.


Luis A. Dolz
Catamarca
Argentina