Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default Type recordset/recordset?

FlaviusFlav wrote ...

rs.open "someurl"
dosomething(rs) <---Type mismatch here
private sub dosometing(rs as ADODB.recordset)


What puzzle's me is why you would want to pass an *open* recordset by
reference to a procedure. It would be very complicated for the calling
procedure if the dosometing code changed the rs pointer to reference
another recordset object. I suspect you want

Private Sub DoSometing(ByVal rs as ADODB.Recordset)

It pays to always be explicit; don't rely on default behavior. Ask
yourself whether you want ByVal or ByRef: the answer is usually ByVal
but the default is ByRef. Being explicit will help the person who
inherits your project when you move on to greater things.

--
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
return recordset Laurent M Excel Discussion (Misc queries) 4 January 26th 05 09:43 AM
Recordset in Excel Newbie Excel Programming 3 February 12th 04 12:34 PM
Recordset Stephan Kassanke Excel Programming 0 September 10th 03 04:45 PM
ADODB Recordset Seth[_3_] Excel Programming 0 August 5th 03 02:15 PM
Default recordset type? -\) Excel Programming 3 July 23rd 03 09:16 AM


All times are GMT +1. The time now is 04:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"