FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Clase con funciones para ADO
Posts: 1276
Joined: Tue Dec 28, 2010 01:29 PM
Clase con funciones para ADO
Posted: Fri Sep 08, 2017 01:57 PM

Hola Foro

Existe alguna clase que agrupe las funciones para ADO sin tener que llamarlas directamente?

FWH 25.12

Harbour/Hbmk2

Microsoft Visual C++

MySql 8.0

Antigravity

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Clase con funciones para ADO
Posted: Fri Sep 08, 2017 02:27 PM

Look for AdoFunc.prg in the Samples folder .. \source\function

Rick Lipkin

Posts: 1276
Joined: Tue Dec 28, 2010 01:29 PM
Re: Clase con funciones para ADO
Posted: Fri Sep 08, 2017 02:28 PM

Thanks

I already check them. I was trying to find a class or something similar to use it instead FW_ function

FWH 25.12

Harbour/Hbmk2

Microsoft Visual C++

MySql 8.0

Antigravity

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Clase con funciones para ADO
Posted: Fri Sep 08, 2017 02:31 PM

Here is my original post ( some years ago ) using native Microsoft Ado Class's and methods .. Rao has done a great job with the wrappers found in AdoFunc.Prg ... Here is the FiveWin Wili on ADO.

Rick Lipkin

http://wiki.fivetechsoft.com/doku.php?i ... ted_stuffs

Posts: 537
Joined: Mon Jan 16, 2006 03:42 PM
Re: Clase con funciones para ADO
Posted: Fri Sep 08, 2017 06:40 PM

*** Constant Group: CursorTypeEnum

command ADO USE <f1> INDEX <v1> LIMITE <l1> => ADOUSE( <(f1)>, <v1>, <l1> )

command ADO REPLACE <f1> WITH <v1> => ADOREPLACE( <(f1)>, <v1> )

command ADO COMMIT => ADOSAVE()

command ADO SELECT <cRecordSet> => ADOSELECT( <cRecordSet> )

command ADO APPEND BLANK => ADOAPEND()

command ADO CLOSE <cRecordSet> => ADOCLOSE( <cRecordSet> )

command ADO DELETE <cRecordSet> => ADODELETE( <cRecordSet> )

command ADO EXECUTE <Sql> => ADOEXECUTE( <(Sql)> )

command ADO GO TOP <cRecordSet> => ADOGOTOP( <cRecordSet> )

command ADO LOAD <cRecordSet> => ADOLOAD( <cRecordSet> )

algo asi

Posts: 1276
Joined: Tue Dec 28, 2010 01:29 PM
Re: Clase con funciones para ADO
Posted: Sat Sep 09, 2017 01:20 PM
Hola,

Me refiero a algo como esto

Code (fw): Select all Collapse
#Include "fivewin.ch"

CLASS TSqlServer
   Data oCon
   Data cHost   
   Data cDatabase
   Data cUser      
   Data cPass      
      
   METHOD New(Host, Database, User, Pass) CONSTRUCTOR
   METHOD CreateDatabase()
   METHOD GetTables()
   METHOD Open(cTable)
   METHOD Query(cSql)
   METHOD Exec(cSql)
   METHOD GetStruct(cTable)
   METHOD ImportFromDbf(cFile)
ENDCLASS


Code (fw): Select all Collapse
METHOD New(Host, Database, User, Pass) CLASS TSqlServer
...
     
::oCon :=  Fw_OpenAdoConnection(cString,.T.)
...

Return Self

FWH 25.12

Harbour/Hbmk2

Microsoft Visual C++

MySql 8.0

Antigravity

Continue the discussion