Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's happening with .actualsize property

Status
Not open for further replies.

elquixiote

Technical User
Nov 30, 2002
99
MX
Does anybody know why the actualsize property returns
the double of the real size of the field in the record ?

Dim i As Integer
Dim adoConn As ADODB.Connection
Dim userRSet As ADODB.Recordset
Set adoConn = New ADODB.Connection
adoConn.Open "dsn=db_criser", "admin", "criser"
Set userRSet = adoConn.Execute("Select * from users order by logonid")
userRSet.MoveNext
MSFlexGrid3.AddItem "Name" & vbTab & "definedSize" & vbTab & "actualSize" & vbTab & "Value" & vbTab & "type"
For i = 0 To userRSet.Fields.Count - 1
With userRSet.Fields(i)
MSFlexGrid3.AddItem .Name & vbTab & _
.DefinedSize & vbTab & _
.ActualSize & vbTab & _
.Value & vbTab & _
.Type
End With
Next i
 
It doesn't on my setup, so I must answer no... Is this behaviour also conistant if you do a debug.print, or only occuring in the MSFlexGrid control?

Roy-Vidar
 
Hi Roy! Thanks for answering...

If I debug.print .actualsize it shows the double of the real field length..

It's so weird !

Any hint ?

El quijote ...

 
Perhaps are you talking about fields stored in UniCode ?
My guess is that ONE unicode char = TWO bytes.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I changed the unicode compression parameter to NO and the behavior remains the same...

What's wrong ?...

el Quijote
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top