Sql Connect toleauto OR createobject

Post Reply
Jack
Posts: 249
Joined: Wed Jul 11, 2007 11:06 am

Sql Connect toleauto OR createobject

Post 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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Sql Connect toleauto OR createobject

Post by Enrico Maria Giordano »

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

EMG
Post Reply