Dispose of ADODB.Recordset with VB Express 2008 
Author Message
 Dispose of ADODB.Recordset with VB Express 2008

Hi,

I've used the VB Express upgrade feature to transform code from VB6 to
VB Express 2008

Part of my original code included:

<Code>
  Dim RS As New ADODB.Recordset
  Set RS = Nothing
  RS.Open("SELECT DISTINCT GENUS FROM Plants ORDER by GENUS;", ogAccess)
</Code>

The translated code included:
<Code>
'UPGRADE_NOTE: Object RS may not be destroyed until it is garbage
collected. Click for more:
'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6E35BFF6-CD74-4B09-9689-3E1A43DF8969"'

RS= Nothing
</Code>

The referenced help indicates that I should Dispose of the RS, but RS
doesn't have a Dispose method.

What is the correct code to destroy the RS object?

Regards,

Laurie



Tue, 17 Jul 2012 06:06:40 GMT  
 Dispose of ADODB.Recordset with VB Express 2008

Quote:
> I've used the VB Express upgrade feature to transform
> code from VB6 to VB Express 2008

That doesn't work.

Quote:
> The referenced help indicates that I should Dispose of
> the RS, but RS doesn't have a Dispose method.
> What is the correct code . . .

No idea. This a VB6 and earlier newsgroup. Your question is about the
imposter, so you would be better off posting it on one of the the imposter's
newsgroups, for example:

    micro$oft.public.dotnet.language$.vb

Mike



Tue, 17 Jul 2012 06:41:53 GMT  
 Dispose of ADODB.Recordset with VB Express 2008
Hi Mike,

Oops.  Microsoft's labels for their Newsgroups are pathetic.

I'll plead there are too many of them and no logic in finding the one
you want.

I've been forced to the imposter by need to work in 64 bit environment.

Regards,

Laurie Comerford

Quote:



>> I've used the VB Express upgrade feature to transform
>> code from VB6 to VB Express 2008

> That doesn't work.

>> The referenced help indicates that I should Dispose of
>> the RS, but RS doesn't have a Dispose method.
>> What is the correct code . . .

> No idea. This a VB6 and earlier newsgroup. Your question is about the
> imposter, so you would be better off posting it on one of the the
> imposter's newsgroups, for example:

>    micro$oft.public.dotnet.language$.vb

> Mike



Tue, 17 Jul 2012 07:20:28 GMT  
 Dispose of ADODB.Recordset with VB Express 2008

Quote:
> Hi,

> I've used the VB Express upgrade feature to transform code from VB6 to VB
> Express 2008

This group is for VB6 and earlier(VB Classic). VB.Net and all dotnet groups
have either "dotnet" or "vsnet" in the group name. Please use the following
group instead:




Tue, 17 Jul 2012 07:19:30 GMT  
 Dispose of ADODB.Recordset with VB Express 2008

Hi,

I've used the VB Express upgrade feature to transform code from VB6 to
VB Express 2008

Don't try to tell that to anyone here because they'll just tell you it can't be done. ;-)

The referenced help indicates that I should Dispose of the RS, but RS
doesn't have a Dispose method.

What is the correct code to destroy the RS object?

Dispose isn't necessary. Just Close and set to Nothing. Garbage disposal takes care of the rest.

You can post Visual Basic .NET/Visual Basic 6.0 interop questions to the below forum:

http://social.msdn.microsoft.com/Forums/en-US/vbinterop/threads

Paul
~~~~
Microsoft MVP (Visual Basic)



Tue, 17 Jul 2012 23:55:58 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Decimal precision and square root problem - VB 2008 Express

2. VB6 app in VB 2008 Express

3. VB Express 2008

4. VB6 to VB 2008 Express Edition convertion

5. VB Express 2008 Tutorial/Good Book

6. Wide Area connection to SQL server 2008 Express via broadband

7. How to invoke form designer in Visual Basic 2008 Express Edition

8. Visual Basic Express 2008 Custom Error Message

9. Visual Basic Express 2008 Edition and KB278379

10. Visual Basic 2008 & Visual Studio 2008

11. Using MSAccess internal Query in VB 2008

12. VB 2008 Compile for x86

 

 
Powered by phpBB® Forum Software