Re: ADOX - Access table creation with nullable columns.
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Thu, 8 Nov 2007 08:48:09 -0600
"Ralph" <nt_consulting64@xxxxxxxxx> wrote in message
news:%23w4GWShIIHA.4480@xxxxxxxxxxxxxxxxxxxxxxx
with
"Andy" <Andy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:2E4C90C7-8C7B-482A-B4B0-622CFF47BC19@xxxxxxxxxxxxxxxx
Thanks for the advice. I've tried to access the properties associated
tothe Column object and hoped to enumerate through them to identify theirnames
(Can't find any documentation on what these are!). I can get a pointer
theam
properties interface only to find the property count equals zero. What
IADOX,
missing here?
VB code may help me - I hope the principles will be the same...
ADOX::_ColumnPtr m_pColumn;
TESTHR(m_pColumn.CreateInstance(__uuidof(ADOX::Column)));
m_pColumn->Name = name;
m_pColumn->Type = nType;
m_pColumn->DefinedSize = lSize;
m_pColumn->Attributes = ADOX::adColNullable;
m_Table->Columns->Append(m_pColumn->Name,nType,lSize);
//Get some properties
ADOX::PropertiesPtr pptr;
m_pColumn->get_Properties(&pptr);
long cnt = pptr->Count; //THIS RETURNS 0 !
Thanks,
Andy
This may or may not help. I often confuse myself when working with ADOX as
it appears to have the same model as ADO, but it is subtly different. So I
may be wrong, but I don't think "Column" has a property collection in
except for provider-specific properties. Your provider may not supply one.
To access existing declared properties (name, type, size, ...) I think you
have to read them one at a time. Just like you set them.
Should change "Your provider may not supply one." to "Your provider may not
supply any additional properties. ie, ADOX supplies the Collection, but it
may be empty."
-ralph
.
- Follow-Ups:
- References:
- Prev by Date: Re: ADOX - Access table creation with nullable columns.
- Next by Date: Unable to pass DBDATE to stored-proc using ADO/C++
- Previous by thread: Re: ADOX - Access table creation with nullable columns.
- Next by thread: Re: ADOX - Access table creation with nullable columns.
- Index(es):
Relevant Pages
|
|