Re: ADOX - Access table creation with nullable columns.
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Thu, 8 Nov 2007 08:35:13 -0600
"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 withnames
the Column object and hoped to enumerate through them to identify their
(Can't find any documentation on what these are!). I can get a pointer tothe
properties interface only to find the property count equals zero. What amI
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 ADOX,
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.
hth
-ralph
.
- Follow-Ups:
- Re: ADOX - Access table creation with nullable columns.
- From: Bob Barrows [MVP]
- Re: ADOX - Access table creation with nullable columns.
- From: Ralph
- Re: ADOX - Access table creation with nullable columns.
- Prev by Date: Re: ADOX - Access table creation with nullable columns.
- Next by Date: Re: ADOX - Access table creation with nullable columns.
- Previous by thread: Re: ADOX - Access table creation with nullable columns.
- Next by thread: Re: ADOX - Access table creation with nullable columns.
- Index(es):