FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ADO for ADS?
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
ADO for ADS?
Posted: Sun Aug 04, 2013 04:43 PM
Mr. Rao;

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 (fw): Select all Collapse
//------------------------------------------------------------------------------
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.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: ADO for ADS?
Posted: Sun Aug 04, 2013 05:34 PM

Honestly I still love ADS and miss ADS. But for the sheer size of our data, I would not have left ADS and migrated to Oracle.

You are aware that there are OLEDB providers for ADS and we can work with ADO.

But knowing both, my advice for you is to continue what you are doing. Do not go the ADO way using ADS' OleDb providers.

Please never think again. Please stick to what you are doing. ADS, using ace.lib is still the best way and what you are doing is still the best.

Now about how do we deal with the results of ADS SqlQuery. If you are using TData or TDataBase that is good.

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion