I now see how you have been working on making standardized ADO functions that work across a number of different sql engines. I have been using ADS for many years quite successfully. I mostly work via ACE32 and the ADS RDDs. I would assume that it is just as possible to work with ADS using ADO. If so, why not make the FW ADO functions compatible with ADS? Can I help? I already have a TAdsQuery() class to execute sqls and even allows you to treat a returning cursor as an array or as TData object.
as in:
- Code: Select all Expand view
- //------------------------------------------------------------------------------
METHOD SaveIdImage() CLASS Tpatient
LOCAL binImage, oQ
IF ::cIDImageFile != NIL .AND. !EMPTY( ::cIDImageFile ) .AND. file( ::cIDImageFile )
binImage := MEMOREAD( ::cIDImageFile )
oQ := TAdsQuery():New()
oQ:cSql := "UPDATE patients SET [image] = :bin_data WHERE recno = '$1$'"
oQ:aSubstitutes := { ::oPatTbl:VarRecNo } //StrTrans '$1$' for array contents on [1]
oQ:AdsPrepareSQL() //to prepare a paraetized query
oQ:SetParameters( "bin_data", binImage, "B" ) //Parameterized query
oQ:RunAdsPreparedSql()
oQ:End()
ENDIF
//fErase( ::cIDImageFile )
//ClearTmpfiles()
RETURN NIL
Reinaldo.