🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #107

Re: retrieving schema information with ADO

#107
From: Mike K
Date: Tue, 28 Aug 2007 18:35
42 lines
2282 bytes
Sorry to need the handholding, but this code:

TADODataSet *DS;
Conn->OpenSchema(siColumns,NULL,NULL,DS);

returns the error: "arguments are of the wrong type, are out of 
acceptable range, or are in conflict with one another."

I see that at design time I can open a dataset with a SELECT * query and 
then have access to FieldDefs, which gives me the field data I need. How 
do I get this data at runtime? I see GetIndexDefs() as a method, but 
nothing for FieldDefs.




Vassiliev V. V. wrote:
> Look at TADOConnection::OpenSchema(). You need schema siColumns.
> 
> //------------------------------------------
> Regards,
> Vassiliev V. V.
> http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
> ADO.Net
> http://www.oledbdirect.com - The fastest way to access MS SQL Server,
> MS Jet (Access) and Interbase (through OLEDB)
> 
> 
> "Mike K" <nospam@nospam.net> ???????/???????? ? ???????? ?????????: 
> news:46d3828b$1@newsgroups.borland.com...
>> I'm building a database converter that needs to know the field data types 
>> for every table.
>>
>> How is this done? I can use GetTableNames() and GetFieldNames() but I 
>> still need the data types for each field.
>>
>> (Using BCB 5)
>>
>> thanks for any help...
>>
> 
> 
Technical Details
Message-ID: <46d46ae6$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!feeder.news-service.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <46d3828b$1@newsgroups.borland.com> <46d3d886@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,c1d0acbe2fb5d61
X-Google-Attributes: gid10698b,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 28 Aug 2007 13:35:19 -0500
From: Mike K <nospam@nospam.net>
User-Agent: Thunderbird 1.5.0.13 (Windows/20070809)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Re: retrieving schema information with ADO
References: <46d3828b$1@newsgroups.borland.com> <46d3d886@newsgroups.borland.com>
In-Reply-To: <46d3d886@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 74.38.225.211
Message-ID: <46d46ae6$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1188326118 74.38.225.211 (28 Aug 2007 11:35:18 -0700)
Lines: 42
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!feeder.news-service.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail