Hi all,
why is the DefinedSize of the Field object of type adInteger returning the
value 4 and the same property on a adVarWChar type field (Text in MS Access)
is returning the max length of the string that it may contain (for example
52)?
I'm using ADO 2.8
Thank You,
Lorenzo 3 3145
Lorenzo Bolognini wrote: Hi all,
why is the DefinedSize of the Field object of type adInteger returning the value 4 and the same property on a adVarWChar type field (Text in MS Access) is returning the max length of the string that it may contain (for example 52)?
I'm using ADO 2.8
Thank You, Lorenzo
Because it takes four bytes (32 bits) to hold the largest available integer
value (2,147,xxx,xxx - I haven't memorized this one - you can look it up if
you're so inclined).
Don't forget, unicode (adVarWChar) takes twice the characters to store the
same data as non-unicode types (adVarChar).
"Bob Barrows" <re******@NOyahoo.SPAMcom> ha scritto nel messaggio
news:%2****************@TK2MSFTNGP11.phx.gbl... Lorenzo Bolognini wrote: Hi all,
why is the DefinedSize of the Field object of type adInteger returning the value 4 and the same property on a adVarWChar type field (Text in MS Access) is returning the max length of the string that it may contain (for example 52)?
Because it takes four bytes (32 bits) to hold the largest available
integer value (2,147,xxx,xxx - I haven't memorized this one - you can look it up
if you're so inclined).
I did imagine something like that but why is the return type of the
DefinedSize of a different type for the two types of field (text and
integer)? Does that make sense?
Thank You for your help,
Lorenzo
Lorenzo Bolognini wrote: "Bob Barrows" <re******@NOyahoo.SPAMcom> ha scritto nel messaggio news:%2****************@TK2MSFTNGP11.phx.gbl... Lorenzo Bolognini wrote: Hi all,
why is the DefinedSize of the Field object of type adInteger returning the value 4 and the same property on a adVarWChar type field (Text in MS Access) is returning the max length of the string that it may contain (for example 52)?
Because it takes four bytes (32 bits) to hold the largest available integer value (2,147,xxx,xxx - I haven't memorized this one - you can look it up if you're so inclined).
I did imagine something like that but why is the return type of the DefinedSize of a different type for the two types of field (text and integer)? Does that make sense?
Thank You for your help, Lorenzo
Why wouldn't it be? I don't understand the question. The defined size of an
integer field has to be 4. The defined size of a Text field is whatever the
size is defined to be in the database.
Bob Barrows This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Georg Scholz |
last post by:
Hello,
The class "Control" contains a documented Property "ControlType".
So for example, in a form, you can write code like this:
Dim c as control
set c = me.Controls("textbox1")
if...
|
by: windandwaves |
last post by:
Hi Folk
I am working with the TYPE property. I want to change that from 2 (byte) to
4 (long integer) for a field that already contains tons of data. How can I
do that?
The help reads:
...
|
by: Andrzej Kaczmarczyk |
last post by:
Hi, I have following problem:
(warning, quite long post with lots of code)
I have an object of a known type
like this.
class MyClass {
public int Property1;
public string Property2;
}
|
by: kevin_g_frey |
last post by:
Hello All,
I have an MC++ class named "Person" which encapsulates access to a
database entity and it contains a number of field properties eg. Code,
Name, Address, Suburb etc.
Each of the...
|
by: Stefan De Schepper |
last post by:
Should I use:
Private m_Name As String
Public Property Name() As String
Get
Return m_Name
End Get
Set(ByVal Value As String)
m_Name = Value
|
by: Mark Jones |
last post by:
I am quite new to ASP and .Net development and I am building a web-based
multiple choice exam application.
The web page displays the questions using a Repeater control and the
answers are nested...
|
by: Bob Darlington |
last post by:
I want to use the caption property for fields in a recordset as a condition
in a loop. That is, I only want to consider those fields which have
captions:
For each fld in RecordsetName.Fields
If...
|
by: Internet User |
last post by:
What is the definition of a field in VB.net (other than database functions)?
How does one distinguish between a "field" and a "property"?
Or are fields and properties related to each other in some...
|
by: andrew cooke |
last post by:
Hi,
This is my first attempt at new classes and dynamic python, so I am
probably doing something very stupid... After reading the how-to for
descriptors at...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |