Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Recordset vs command or connection object

Author  Topic 

Tiwari
Starting Member

18 Posts

Posted - 2002-07-03 : 04:24:06
For performing update,delete or insert which one is better recordset.update
recordset.delete
or executing query by using command or connection object.

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2002-07-03 : 05:26:19
Depends what you want...

rs.update and rs.delete update the recordset and then the data... Executing a query can be faster, but you would only notice if you had a slow connection or a massive recordset....

Peace

Rick

Go to Top of Page

Tiwari
Starting Member

18 Posts

Posted - 2002-07-03 : 06:02:42
Which one will be faster or better option1 or option2

dim cmd As ADODB.Command
dim g_connection as adodb.connection

option 1:

With cmd
.ActiveConnection = g_oconnection
.CommandText = Sql
.CommandType = adCmdText
.Execute
End With
Set cmd.ActiveConnection = Nothing


option 2:
g_connection.execute

please mention the reason to make me more clear about using command object or connection directly. write know i am using option1 and its working fine.


Go to Top of Page
   

- Advertisement -