FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour 2012 server
Posts: 102
Joined: Sat Jun 06, 2015 06:57 PM
Re: 2012 server
Posted: Mon Jun 15, 2015 05:22 PM

Which is better to convert a large legacy application to SQL: SQLRDD or ADORDD?

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: 2012 server
Posted: Mon Jun 15, 2015 07:29 PM

I would say that AdoRdd is the best way to go as there is full source code available and Antonio Ferreira is providing a great support for it :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 102
Joined: Sat Jun 06, 2015 06:57 PM
Re: 2012 server
Posted: Mon Jun 15, 2015 07:40 PM

Thanks Antonio,

Back in the 90's after much deliberation I chose Fivewin to migrate from DOS to Windows and never regretted it, so I will probably go with your advice again!

Regards,

David

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: 2012 server
Posted: Mon Jun 15, 2015 07:44 PM

David,

Thanks for trusting in my advice and for your support along all these years :-)

Antonio Ferreira has confirmed that he has ported a large app to AdoRdd without any source code modifications!

Thats great :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 838
Joined: Fri Feb 10, 2006 12:14 PM
Re: 2012 server
Posted: Tue Jun 16, 2015 07:29 AM

David,

I ported a large app with no code change.

In this case was easy because the app worked already with ADS so the indexes expressions with vars were all evaluated before sent to adordd.

This should be the only exception in the code of actual apps because vars are out of scope when sent to SQL so need to be evaluated before and sent the result as a string.

Lucas is also testing in his application and so far its seems its running quite good.

Regards

Antonio H Ferreira
Posts: 102
Joined: Sat Jun 06, 2015 06:57 PM
Re: 2012 server
Posted: Tue Jun 16, 2015 04:29 PM

No code changes? I was reading that ADDRDD Error thread and it seems like you have to do quite a bit of stuff with regard to files and indexes. Plus you can't use recno() anymore, which I use a lot. But if that's all there is I guess its not too bad.

Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: 2012 server
Posted: Tue Jun 16, 2015 04:53 PM
David,

You have only to indicate at the begining of your application a few settings and that´s all.

Yes, you can use Recno().

This is a sample:

Code (fw): Select all Collapse
function Main()

  RddRegister("ADORDD",1)
  RddSetDefault("ADORDD")

   SET DATE FORMAT TO "dd-mm-yyyy" // Formato Fecha: DD-MM-AAAA
   SET CENTURY ON
   SET EPOCH TO YEAR(DATE())-98


  SET ADO TABLES INDEX LIST TO {{ "TABLE1", {"TEST1", "FIRST"} ,;
                                            {"TEST2", "LAST"} ,;
                                            {"TEST3", "AGE"} },;
                                    {"LUCAS", {"LUCAS1", "NOMBRE"} ,;
                                              {"LUCAS3", "NOMBRE", "WHERE NOMBRE = 'LUCAS'"}     }     }


  SET ADODBF TABLES INDEX LIST TO { { "TABLE1", {"TEST1", "FIRST"} ,;
                                               {"TEST2", "LAST"} ,;
                                               {"TEST3", "AGE"} },;
                                    {"LUCAS", {"LUCAS1", "NOMBRE"} ,;
                                              {"LUCAS3", "NOMBRE", "NOMBRE = 'LUCAS'" }   } }




  SET ADO DEFAULT RECNO FIELD TO "HBRECNO"

  SET AUTOPEN OFF //ON //might be OFF if you wish

  //SET AUTORDER TO 1 // first index opened can be other

  SET ADO FORCE LOCK OFF


  SET ADO DEFAULT DATABASE TO "LUCASTABLE.MDB"  ENGINE TO "ACCESS" USER TO "" PASSWORD TO ""



That´s all.

The rest of your code is the SAME, including filters.
Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 102
Joined: Sat Jun 06, 2015 06:57 PM
Re: 2012 server
Posted: Tue Jun 16, 2015 05:40 PM

Thanks Lucas,

That was helpful

David

Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: 2012 server
Posted: Mon Oct 24, 2016 07:32 AM

Dear driessen,
can you post again the link in wich is explained exactly the operations to do in server and clients?
I have a lot of problems

Marco Boschi
info@marcoboschi.it
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: 2012 server
Posted: Wed Oct 26, 2016 01:48 AM

This is a post on Harbour Users group from someone experiencing slowness on Windows 2012 too - https://groups.google.com/forum/#!topic ... -1OKaCvTxk

HTH

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour

Continue the discussion