Re: DataType for storing pointlist (x,y,z)?
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Tue, 1 Apr 2008 11:33:54 -0500
"MP" <NoSpam@xxxxxxxxxx> wrote in message
news:u4N25P1kIHA.484@xxxxxxxxxxxxxxxxxxxxxxx
Greetings,indicate
Using vb6, ado, writing to mdb format(jet 4.0)
If I want to store an array of 3 doubles, what would be best for the data
type of the field?
from Type Property (ado) in the help in vb6
Constant Description
adArray Joined in a logical OR together with another type to
that the data is a safe-array of that type (DBTYPE_ARRAY).indicate
adVariant An Automation Variant (DBTYPE_VARIANT).
adVector Joined in a logical OR together with another type to
that the data is a DBVECTOR structure, as defined by OLE DB, that containsa
count of elements and a pointer to data of the other type (DBTYPE_VECTOR).efficient,
would it be one of the above?
which one is better and why?
or would it be better to break the array into components and store each as
adDouble?
fldPtX
fldPtY
fldPtZ
most likely the incoming data will be either a variant containing an array
of (2 or 3) doubles
or the array itself (not wrapped in a variant)
I could massage this before sending to ado for putting in the database so
which would be more ...fill in the blanks <g> ...better, faster,
???
It really depends on what these "doubles" mean and if you only have three or
many.
I would be sorely tempted to KISS it off, and store a primary key and then
store the doubles in another associated table. A simple getrows() could
provide a variant array.
-ralph
<g>
.
- Follow-Ups:
- Prev by Date: Connection.Open Slow in Compiled Code
- Next by Date: Re: DataType for storing pointlist (x,y,z)?
- Previous by thread: Connection.Open Slow in Compiled Code
- Next by thread: Re: DataType for storing pointlist (x,y,z)?
- Index(es):
Relevant Pages
|