ADO for ADS?

ADO for ADS?

Postby reinaldocrespo » Sun Aug 04, 2013 4: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: 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.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: ADO for ADS?

Postby nageswaragunupudi » Sun Aug 04, 2013 5: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
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 111 guests