Question Ado 2.7 Field Object , Vb6.0 
Author Message
 Question Ado 2.7 Field Object , Vb6.0

David,

It could be a bug in MDAC. I will try to check it.

--
Val Mazur
Microsoft MVP


Quote:
> Does anyone know if there is cleanup involved with the adodb.field
> object?
>    I have a VB 6.0 app that loads a recordset and returns the field
> info.
>    Here is a snipet using a fake SQL statement
> ------------
>   Dim rs as adodb.recordset
>   dim fs as adodb.field
> Set rs = new adodb.recordset

> rs.open "Select Music_Score,Grade From FakeTable",Cn,3,4

> Set fs = rs.fields("Music_Score")
> txtfake.text = cstr(fs.actualsize)
> rs.close
> set rs = nothing
> set fs = nothing
> ---------------
> This is the basics, but it's leaking after each call of this sub.  The
> app gains in memory usage.  Do I have to close the field object?
> If I remove the field object and call directly from the recordset, the
> leak goes away, so I think it's pretty much narrowed down to the field.

> I am currently skipping the whole field object stuff and going directly
> to the fields collection of the recordset as a workaround, but I'd like
> to know if I missed a step

> Thanx
> DRC
> Alphabet collector (MCP,MCSD,MCSA,NECD ECT.)

> *** Sent via Developersdex http://www.*-*-*.com/ ***
> Don't just participate in USENET...get rewarded for it!



Sat, 30 Apr 2005 04:34:37 GMT  
 Question Ado 2.7 Field Object , Vb6.0
Does anyone know if there is cleanup involved with the adodb.field
object?
   I have a VB 6.0 app that loads a recordset and returns the field
info.
   Here is a snipet using a fake SQL statement
------------
  Dim rs as adodb.recordset
  dim fs as adodb.field
Set rs = new adodb.recordset

rs.open "Select Music_Score,Grade From FakeTable",Cn,3,4

Set fs = rs.fields("Music_Score")
txtfake.text = cstr(fs.actualsize)
rs.close
set rs = nothing
set fs = nothing
---------------
This is the basics, but it's leaking after each call of this sub.  The
app gains in memory usage.  Do I have to close the field object?
If I remove the field object and call directly from the recordset, the
leak goes away, so I think it's pretty much narrowed down to the field.

I am currently skipping the whole field object stuff and going directly
to the fields collection of the recordset as a workaround, but I'd like
to know if I missed a step

Thanx
DRC
Alphabet collector (MCP,MCSD,MCSA,NECD ECT.)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sat, 30 Apr 2005 04:01:45 GMT  
 Question Ado 2.7 Field Object , Vb6.0
David,

What is your connection string? Could you post it here please?

--
Val Mazur
Microsoft MVP


Quote:
> Does anyone know if there is cleanup involved with the adodb.field
> object?
>    I have a VB 6.0 app that loads a recordset and returns the field
> info.
>    Here is a snipet using a fake SQL statement
> ------------
>   Dim rs as adodb.recordset
>   dim fs as adodb.field
> Set rs = new adodb.recordset

> rs.open "Select Music_Score,Grade From FakeTable",Cn,3,4

> Set fs = rs.fields("Music_Score")
> txtfake.text = cstr(fs.actualsize)
> rs.close
> set rs = nothing
> set fs = nothing
> ---------------
> This is the basics, but it's leaking after each call of this sub.  The
> app gains in memory usage.  Do I have to close the field object?
> If I remove the field object and call directly from the recordset, the
> leak goes away, so I think it's pretty much narrowed down to the field.

> I am currently skipping the whole field object stuff and going directly
> to the fields collection of the recordset as a workaround, but I'd like
> to know if I missed a step

> Thanx
> DRC
> Alphabet collector (MCP,MCSD,MCSA,NECD ECT.)

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Sat, 30 Apr 2005 04:41:03 GMT  
 Question Ado 2.7 Field Object , Vb6.0
"PROVIDER=SQLOLEDB.1;Data
Source=MsSqlServer7;uid=SA;Password=MySaPassword;database=hotlips;Persis
t Security Info=true"

DRC
Alphabet collector (MCP,MCSD,MCSA,NECD ECT.)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sun, 01 May 2005 23:30:21 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. ADO 2.7 mishandling Identity fields

2. Setting the ActiveConnection property of a Command Object (ADO 2.7)

3. ADO 2.7 Libary Question?

4. Oracle and ADO 2.7 Question

5. VB6 and ADOX 2.7

6. VB6 and ADOX 2.7

7. Datagrid with ADO 2.7

8. ADO 2.7 in VB.NET

9. ADO 2.7 recordset binding

10. ADO 2.7 in VB.NET

11. using ADO 2.7 on Windows 95 machine

12. ADO 2.7 in VB.NET

 

 
Powered by phpBB® Forum Software