Sql Connect toleauto OR createobject

Sql Connect toleauto OR createobject

Postby Jack » Wed Aug 22, 2018 3: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
Jack
 
Posts: 284
Joined: Wed Jul 11, 2007 11:06 am

Re: Sql Connect toleauto OR createobject

Postby Enrico Maria Giordano » Wed Aug 22, 2018 3:28 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8518
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 54 guests