Re: DESC TABLE <table> does seem to word with ODBC
Posted in 2004
--0__=09BBE4F4DFC5B69F8f9e8a93df938690918c09BBE4F4DFC5B69F
Content-type: multipart/alternative;
Boundary="1__=09BBE4F4DFC5B69F8f9e8a93df938690918c09BBE4F4DFC5B69F"
--1__=09BBE4F4DFC5B69F8f9e8a93df938690918c09BBE4F4DFC5B69F
Content-type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: quoted-printable
You can avoid the hassle of having to construct queries on system catal=
og
tables by calling the ODBC catalog functions
Here is the list of catalog functions and their description from MSDN.
Hope it helps!
=
Function Description =
=
SQLTables Returns a list of catalogs, schemas, tables, or table types=
in
the data source. =
=
SQLColumns Returns a list of columns in one or more tables. =
=
SQLStatist Returns a list of statistics about a single table. Also =
ics returns a list of indexes associated with that table. =
=
SQLSpecial Returns a list of columns that uniquely identifies a row in=
a
Columns single table. Also returns a list of columns in that table =
that are automatically updated. =
=
SQLPrimary Returns a list of columns that compose the primary key of a=
Keys single table. =
=
SQLForeign Returns a list of foreign keys in a single table or a list =
of
Keys foreign keys in other tables that refer to a single table. =
=
SQLTablePr Returns a list of privileges associated with one or more =
ivileges tables. =
=
SQLColumnP Returns a list of privileges associated with one or more =
rivileges columns in a single table. =
=
SQLProcedu Returns a list of procedures in the data source. =
res =
=
SQLProcedu Returns a list of input and output parameters, the return =
reColumns value, and the columns in the result set of a single =
procedure. =
=
SQLGetType Returns a list of the SQL data types supported by the data =
Info source. These data types are generally used in CREATE TABLE=
and ALTER TABLE statements. =
=
Kanchana Padmanabhan
Software Engineer
R&D - IBM Data Management Group
11200 Lakeview, Lenexa, KS 66219
Tel: 913 599 8674 t/l : 337 8674 Fax: 913 599 7260
=
"Fred \\(au =
boulot\\)" =
<falxirco@wanadoo =
To
.fr> informix-list@iiug.org =
Sent by: =
cc
owner-informix-li =
st@iiug.org Subj=
ect
Re: DESC TABLE <table> does seem=
to
word with ODBC =
03/30/2004 01:22 =
AM =
=
=
Please respond to =
"Fred \\(au =
boulot\\)" =
=
=
Thanks for your answer ... and thank about the advice, i removed the
no_spam
:-)
As i am not a confirmed Informix administrator or even developper (the
database was not installed by our company ... i am able only to do
import/export data using ODBC to use in our "home made" softwares) i do=
nt
even know how to use the solution you provided :-)
The information i needed from the DESC command was the description on t=
he
keys and indexes. I will try to extract this information from the
sysindexes
table :-)
-------------------------------------------------------------
Fr=E9d=E9ri LACROIX
"Gestion des Besoins en Informatique"
France
-------------------------------------------------------------
"Art S. Kagel" <kagel@bloomberg.net> a =E9crit dans le message de
news:pan.2004.03.29.15.58.37.248246.1445@bloomberg.net...
> On Mon, 29 Mar 2004 08:02:48 -0500, Fred \\(au boulot\\) wrote:
>
> DESC TABLE is not an IDS or standard SQL command but specific to some=
> implementations. If you get my dbschema replacement utility, or any =
of
> several script based schema utilities available in the IIUG Software
> Repository, in there you will find all of the SQL you need to determi=
ne
your
> database's schema. Myschema is part of the package utils2_ak.
>
> Art S. Kagel
>
> PS - While I appreciate the reasons, most folk will not send you a re=
ply
if
> you use a no-spam address. This one's written so, I'll be nice.
>
> > Hello,
> >
> > I am in need to extract the database structure using an ODBC connec=
tion
to
> > my IDS 7.3 database. When i try to execute the SQL commande "desc t=
able
> > mytable" the system does recognise the commande and state a syntax
error.
> >
> > How can i get the structure of the base (table, fields and keys)
> >
> > Thanks in advance,
> >
> > Fred
=
--1__=09BBE4F4DFC5B69F8f9e8a93df938690918c09BBE4F4DFC5B69F
Content-type: text/html; charset=ISO-8859-1
Content-Dispositio