I can´t compile this code:
- Code: Select all Expand view RUN
LOCAL cTabla := company("ITEMS")
aSql := SQL INSERT INTO &cTabla ( CODIGO, DESCRIPCIO, IMPORTE ) VALUES ( 'C01', 'CONCEPTO PARA PRUEBAS', 12.12 )
SQLEXEC( aSQL )
Thank you.
LOCAL cTabla := company("ITEMS")
aSql := SQL INSERT INTO &cTabla ( CODIGO, DESCRIPCIO, IMPORTE ) VALUES ( 'C01', 'CONCEPTO PARA PRUEBAS', 12.12 )
SQLEXEC( aSQL )
LOCAL cTabla := company("ITEMS")
PRIVATE cTabla := company("ITEMS")
#xtranslate ADO_SQL UPDATE [TABLE <tbl> ] SET [ <col1> = <val1> [,<colN> = <valN> ] ] [ WHERE <*cwhere*> ] => ;
"UPDATE " + <tbl> + " SET " + ;
FW_ArrayAsList( \{ FW_QuotedColSQL( <"col1"> ) + " = " + FW_ValToSQL( <val1> ) ;
[, FW_QuotedColSQL( <"colN"> ) + " = " + FW_ValToSQL( <valN> ) ] \} ) [ + " WHERE " + CharRepl( '"', <"cwhere">, "'", .t. ) ]
MOISES wrote:Sorry, not working.
local cSql
local cName := "John"
local cCity := "New York"
local dHireDate:= Date() - 1200
local nSalary := 123023.75
PRIVATE cTable := "customer"
cSql := SQL INSERT INTO &cTable ( FIRST, CITY, HIREDATE, SALARY ) VALUES ( cName, cCity, dHireDate, nSalary )
? cSql
local cSql
local aData := ;
{ { "John", "New York", Date() - 1200, 23465.55 } ;
, { "Jimmy", "Sydney", Date() - 2000, 32000.00 } ;
, { "David", "Manila", Date() - 4000, 54234.76 } ;
}
PRIVATE cTable := "customer"
cSql := SQL INSERT INTO &cTable ( FIRST, CITY, HIREDATE, SALARY ) ARRAY aData
? cSql
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 87 guests