how to find sizeof(recordset) in vb.net ?

dim rs as new adodb.recordset
rs.open "select * from emp",cn ....
 
how to find sizeof(rs)  or memoryoccupied(rs)
I want to find how many bytes  has occupied  for  rs while that appliation is running ?


tamilsoftAsked:
Who is Participating?
 
Alfredo Luis Torres SerranoConnect With a Mentor Development Director / DBACommented:
0
 
CodeCruiserCommented:
0
 
tamilsoftAuthor Commented:
how to calculate in vb.net coding ?
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
Alfredo Luis Torres SerranoDevelopment Director / DBACommented:
Assuming you have a table inside a dataset, thus:

Dim daTemp As New SqlDataAdapter("select * from Temp",oconn)

Dim dsTemp As New DataSet("Temp")

daprod.Fill(dsTemp, "Temp")

dim i as integer

i = dsprod.tables(0).rows.count

Hope this help
0
 
tamilsoftAuthor Commented:
expert mister "Masteraco".  your answer is wrong.  I dont ask about  sql table record count.
I asked is   I want to find TotalBytes(recordset).

0
 
Alfredo Luis Torres SerranoConnect With a Mentor Development Director / DBACommented:
Probably you could do it taking the number of columns and determine the size of each column by its datatype for fixed-length datatypes.

Calculate the space used for any nullable columns Then calculate the rowspace:

Row_Size = Fixed_Data_Size + Variable_Data_Size + Null_Bitmap + 4

HTH
0
 
tamilsoftAuthor Commented:
I dont understand. please explain
what is fixed_Data_size  ?
what is variable_Data_size  ?
what is Null_Bitmap +4 ?
0
 
Alfredo Luis Torres SerranoConnect With a Mentor Development Director / DBACommented:
fixed data size is where the field type is varchar nvarchar and you explicity specify the size of the data.

Variable data size in where the field type is ntext and those fields that the size are variable.

And null bitmap in in the case you have image fields.

http://msdn.microsoft.com/en-us/library/ms172424%28v=sql.100%29.aspx
0
 
tamilsoftAuthor Commented:
ok."Masteraco". your answer creates idea. I want  sizeof(datatypes)  for oracle. but you have told sizeof(datatypes) for sql server.
I want sizes for   oracle.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.