FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Sql Connect toleauto OR createobject
Posts: 300
Joined: Wed Jul 11, 2007 11:06 AM
Sql Connect toleauto OR createobject
Posted: Wed Aug 22, 2018 03:10 PM

Hi
What is the best way to establish a connection with MS SQLSERver

oCon := TOLEAuto():New('ADODB.Connection')
or
oCon := CREATEOBJECT( "ADODB.Connection" )

It is the same for recordset :
oRsd := TOleAuto():New( "ADODB.Recordset" )
or
oRscp:=CREATEOBJECT( "ADODB.Recordset" )

Thanks

Philippe

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Sql Connect toleauto OR createobject
Posted: Wed Aug 22, 2018 03:28 PM

They are the same. I personally prefer Createobject() because it's used unchanged in many different programming environments.

EMG

Continue the discussion