William Vaughn
5/3/2008 4:35:00 PM
The JET/Access ODBC driver is very limited in functionality. It was
implemented to provide a way to extract and save data but not much more.
Unless you use a more full-featured interface via DAO or OLE DB (where there
is a version-specific OLE DB data provider) you cannot expect to see much
metadata returned via the GetSchema calls in ADO.NET.
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
"Olaf Krause" <krause_olaf@hotmail.com> wrote in message
news:2500797F-AAC9-4A16-BA09-136E1E4A5FD6@microsoft.com...
> Still searching for a solution or at least a workaround - maybe there is a
> simple one which I do not see..
>
> thx
>
> Olaf
>
> "Olaf Krause" <olaf.krause@ok-edv.de> schrieb im Newsbeitrag
> news:ECD25A9E-D2C3-4CB5-9E4A-B31C7C057EB5@microsoft.com...
>> It seems that nobody knows... or is it just impossible?
>>
>> "Olaf Krause" <olaf.krause@ok-edv.de> schrieb im Newsbeitrag
>> news:8401B1A4-3630-4D57-B6C4-F7F829A5A21B@microsoft.com...
>>> Maybe the subject was a bit misleading the so question again in
>>> shortform
>>> 1. How can I get a list of relations and constraints via ODBC.NET
>>> 2. How can I delete a relation/constraint
>>>
>>> thx
>>>
>>> Olaf
>>>
>>> "Olaf Krause" <olaf.krause@ok-edv.de> schrieb im Newsbeitrag
>>> news:23C74226-D21A-41BD-B030-570C1AB95A40@microsoft.com...
>>>> Hi,
>>>>
>>>> Situation:
>>>> * Access to a MS Access DB via ODBC
>>>> * Two columns of two tables a related (checked with MS Access GUI)
>>>> * I want to delete (drop) one colum of one table (which is not a key
>>>> column) but related to the other table
>>>>
>>>> code:
>>>> commandstr="ALTER TABLE "+Name+" DROP COLUMN "+scheme.ColumnName;
>>>> //MLHIDE
>>>>
>>>> cmd=AdoProviderFactory.GetCommand(commandstr,m_DB.Connection,m_DB.ProviderType);
>>>> try
>>>> {
>>>> cmd.ExecuteNonQuery();
>>>> }
>>>>
>>>>
>>>> Since there is a relation I get an error message - OK.
>>>> 1. How can I get a list of relations via ODBC.NET.
>>>> 2. How can I delete a relation
>>>>
>>>> All the example I found are working on a dataset. But if I fill a
>>>> dataset via a ODBC adaption there a no relations...
>>>>
>>>> commandstr += "SELECT * FROM \"" + TableName + "\""; //
>>>> do I have to change this, table is the one I want to drop a column
>>>> cmd = AdoProviderFactory.GetCommand(commandstr,
>>>> m_DB.Connection, m_DB.ProviderType);
>>>> adapter.SelectCommand = cmd;
>>>> try
>>>> {
>>>> DataSet destdataset = new DataSet();
>>>> adapter.Fill(destdataset);
>>>>
>>>> Maybe I have to use the connection.GetSchema("WHATTOFILLHERE") methods
>>>> to get Relations via ADO .NET?
>>>>
>>>> thx in advance
>>>>
>>>
>>>
>>
>