Page 1 of 1

Sql Connect toleauto OR createobject

Posted: Wed Aug 22, 2018 3:10 pm
by Jack
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

Re: Sql Connect toleauto OR createobject

Posted: Wed Aug 22, 2018 3:28 pm
by Enrico Maria Giordano
They are the same. I personally prefer Createobject() because it's used unchanged in many different programming environments.

EMG