run stored procedure with parameters and view results ActiveVfp

Dec 8, 2015 at 10:08 PM
run stored procedure with parameters and view results ActiveVfp

vfp line
lcsql = 'INV_Informe_Precios '+[']+lcproveedorid+[', ]+[']+lcgrupoid+[', ]+[']+lcmarca+[' ]
lnsql = SQLEXEC(_myclass.sqlserverid, lcsql, "SQLREPORT")
Coordinator
Dec 9, 2015 at 2:21 PM
Never use string concatenation to build sql commands. Use parameters:
lcSQL = "EXEC INV_Informe_Precios ?lcProveedorID, ?lcGrupoID, ?lcMarca"
lnSQL = SQLEXEC(_myclass.sqlserverid, lcSQL, "SQLREPORT")
Saludos

Victor Espina
Dec 12, 2015 at 12:11 AM
Victor greetings thanks for the advice , how he would run the code in active vfp
thanks
Coordinator
Dec 12, 2015 at 8:05 PM
See the "Simple VFP to HTML table" sample on ActiveVFP

Victor