ORM power in next FWH

Re: ORM power in next FWH

Postby Antonio Linares » Tue Jul 30, 2019 8:13 pm

Leandro,

Aqui falta una "e": LOWNCONN_CTION

Prueba a modificar source\classes\FWORM.PRG

a ver si con ese cambio te funciona
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41342
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: ORM power in next FWH

Postby leandro » Thu Aug 01, 2019 8:56 pm

Antonio buenas tardes,

hice el cambio que recomendaste, pero ahora sale este error:

Code: Select all  Expand view
Application
===========
   Path and name: C:\dlyma\dlyma.exe (32 bits)
   Size: 6,175,232 bytes
   Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20190613)
   FiveWin  version: FWH 19.06
   C compiler version: Borland/Embarcadero C++ 7.3 (32-bit)
   Windows version: 6.2, Build 9200

   Time from start: 0 hours 0 mins 7 secs
   Error occurred at: 01/08/2019, 15:56:16
   Error description: Error BASE/1003  No existe la variable: PDOLPHINSRV

Stack Calls
===========
   Called from: c:\dlyma\prg\Fworm.prg => ORM_CONNECTION:NEW( 48 )
   Called from: c:\dlyma\prg\R32_fact.prg => R32_FACT( 31 )
   Called from: c:\dlyma\prg\Alyma.prg => (b)TLYMA:AUTORIZA( 1150 )
   Called from: c:\dlyma\prg\Alyma.prg => TLYMA:AUTORIZA( 1150 )
   Called from: c:\dlyma\prg\R32_menu.prg => (b)MAIN( 440 )
   Called from: .\source\classes\TRBTN.PRG => TRBTN:CLICK( 717 )
   Called from: .\source\classes\TRBTN.PRG => TRBTN:LBUTTONUP( 917 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1791 )
   Called from: .\source\classes\TRBTN.PRG => TRBTN:HANDLEEVENT( 1575 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3546 )
   Called from:  => WINRUN( 0 )
   Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1078 )
   Called from: c:\dlyma\prg\R32_menu.prg => MAIN( 529 )
 
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1482
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: ORM power in next FWH

Postby nageswaragunupudi » Fri Aug 02, 2019 4:25 am

It is working correctly here.
You made a modification to the fworm.prg as advised by Mr. Antonio.
Please make sure you have this line of code in fworm.prg (line 11)
Code: Select all  Expand view
static pDolphinSrv, pClipValue2SQL
 


In our tests here we are not getting any errors.
This is our test:
Code: Select all  Expand view
#include "fivewin.ch"

function Main()

   local oServer
   local orm, oStates

   oServer  := FW_DemoDB( "DLP" ) // Dolphin connection
   orm      := ORM_Connection():New( oServer )
   oStates  := orm:Table( "states" )
   oStates:Browse()

   oServer:End()

return nil

EXTERNAL TDOLPHINSRV
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10264
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: ORM power in next FWH

Postby Otto » Fri Aug 02, 2019 6:03 am

Dear Mr. Rao,
can we use this ORM power to update remote DBF files?
Thank you in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6033
Joined: Fri Oct 07, 2005 7:07 pm

Re: ORM power in next FWH

Postby leandro » Fri Aug 02, 2019 3:28 pm

Mr Nages.

La línea 11 esta en donde debe estar.

Code: Select all  Expand view

#include "fivewin.ch"

#define REVD

#define LIB_ADO   1
#define LIB_FWH   2
#define LIB_DLP   4

#xtranslate XTRIM( <u> ) => If( HB_ISCHAR( <u> ), Trim( <u> ), <u> )

static pDolphinSrv, pClipValue2SQL
static cAggrFuncList := ",AVG,COUNT,SUM,STD,STDEV,MAX,MIN,GROUP_CONCAT,VARIANCE,"

//----------------------------------------------------------------------------//

CLASS ORM_Connection

   DATA   cServer
   DATA   cDataBase
   DATA   cUserName
   DATA   oCn

   DATA   nLib     INIT 0
   DATA   rdbms    INIT "MYSQL"

   DATA   lOwnConnection INIT .t.
   DATA   lOwnConnction //agrega la data que menciono Antonio

   METHOD New( cServer, cDataBase, cUserName, cPassword )
   METHOD Connect( cPassWord )
   METHOD Tables()
   METHOD HasTable( cTable ) INLINE ::Tables():Contain( cTable )
   METHOD Table( cTableName )
   METHOD Close() INLINE If( ::oCn == nil .or. !::lOwnConnection,,;
            ( If( ::nLib == LIB_DLP, ::oCn:End(), ::oCn:Close() ), ::oCn := nil ) )

   ERROR HANDLER OnError( uParam1 )

ENDCLASS
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1482
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 26 guests