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.
Author |
Topic |
GenerationWithoutName
Starting Member
26 Posts |
Posted - 2002-08-21 : 08:37:52
|
Which better for loading data fromm database, use Recordset Object (rst.Open() ...) or Command object (set rst= oCmd.Execute()...)DIJE |
|
Onamuji
Aged Yak Warrior
504 Posts |
Posted - 2002-08-21 : 08:48:51
|
Here's my two cents: As anyone here will tell you; stored procedures are a much better solution than compiling the SQL inside an application, thus the use of a ADODB.Command object is needed (but not required.) I would strongly voice the fact that using a Command object to execute a stored procedure and then getting the results with a recordset is the best way; however it is not the only way. If you don't use stored procedures you are going to run into many problems in the future either with security, speed, reliability, and/or maintainability. I'm sure an entire book could be written on just the reasons alone. I'm sure others will express their own opinions ... just take to heart you are a programmer/developer and its up to you how well your applications run. |
 |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-08-21 : 08:56:22
|
I always use the command object.What happens if you don't return a recordset? You can still execute the command.And yes always interface to sql server via stored procedures.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|