Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Getting schema Indexes for a table - GetSchema("Indexes", restrictions);

2 posts in General Discussion Last posting was on 2012-07-02 20:15:00.0Z
Alex F Posted on 2012-07-02 19:49:30.0Z
Sender: 4d80.4ff1f9e3.1804289383@sybase.com
From: Alex F
Newsgroups: sybase.public.ase.general
Subject: Getting schema Indexes for a table - GetSchema("Indexes", restrictions);
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4ff1fb4a.4dc2.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 2 Jul 2012 12:49:30 -0700
X-Trace: forums-1-dub 1341258570 172.20.134.41 (2 Jul 2012 12:49:30 -0700)
X-Original-Trace: 2 Jul 2012 12:49:30 -0700, 172.20.134.41
Lines: 11
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31216
Article PK: 74105

I'm trying to get list of Indexes for a table and I'm using
following method but can't figure out how to construct the
restriction so I only get the indexes for a specific table.
var restriction = new string[4];
restriction[3] = "MyTable";
aseConn.GetSchema("Indexes", restriction);

When I change the size for string I either get the error
"More restrictions were provided than the requested schema
('Indexes') supports" or if I make the size smaller I get
the error "Invalid amount of parameters"


Rob V Posted on 2012-07-02 20:15:00.0Z
From: Rob V <rob@sypron.nl>
Reply-To: rob@sypron.nl
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Getting schema Indexes for a table - GetSchema("Indexes", restrictions);
References: <4ff1fb4a.4dc2.1681692777@sybase.com>
In-Reply-To: <4ff1fb4a.4dc2.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4ff20144$1@forums-1-dub>
Date: 2 Jul 2012 13:15:00 -0700
X-Trace: forums-1-dub 1341260100 172.20.134.152 (2 Jul 2012 13:15:00 -0700)
X-Original-Trace: 2 Jul 2012 13:15:00 -0700, vip152.sybase.com
Lines: 35
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31217
Article PK: 74106


On 02-Jul-2012 21:49, Alex F wrote:
> I'm trying to get list of Indexes for a table and I'm using
> following method but can't figure out how to construct the
> restriction so I only get the indexes for a specific table.
> var restriction = new string[4];
> restriction[3] = "MyTable";
> aseConn.GetSchema("Indexes", restriction);
>
> When I change the size for string I either get the error
> "More restrictions were provided than the requested schema
> ('Indexes') supports" or if I make the size smaller I get
> the error "Invalid amount of parameters"

What you posted is not a SQL query, but some different API. You should
look into the documentation of that GetSchema function for usage
instructions. This newsgroup is unlikely to be able to help you without
further details.

HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Professional DBA for Sybase ASE, IQ, Replication Server

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE"
"The Complete Sybase IQ Quick Reference Guide" (new!)
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------