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.

Question On Creating indexes and RIs

5 posts in Delphi Last posting was on 2003-09-05 15:22:53.0Z
"Jeff Kreider" Posted on 2003-09-03 19:45:52.0Z
From: "Jeff Kreider" <jeff(-at-)pctournaments.com>
Newsgroups: Advantage.Delphi
Subject: Question On Creating indexes and RIs
Date: Wed, 3 Sep 2003 14:45:52 -0500
Lines: 9
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 168.236.254.1
Message-ID: <3f56456b@solutions.advantagedatabase.com>
X-Trace: 3 Sep 2003 13:47:55 -0700, 168.236.254.1
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!168.236.254.1
Xref: solutions.advantagedatabase.com Advantage.Delphi:13864
Article PK: 1107301

Why are indexes or tables opened when they are created within a dictionary?
After creting both tables and indexes via SQL and then assigning the table
properties, I had to disconnect the AdsConnection in order for the CreateRI
function to work. Until I did this, I kept getting a 7039 and a 7008
errors. I had to go to the error table to find the 7039 error.

Jeff Kreider


Jeremy D. Mullin Posted on 2003-09-04 14:08:47.0Z
From: Jeremy D. Mullin <jeremym@extendsys.com>
Newsgroups: Advantage.Delphi
Subject: Re: Question On Creating indexes and RIs
Date: Thu, 4 Sep 2003 08:08:47 -0600
Message-ID: <MPG.19c0f55871ce2419989b8a@solutions.advantagedatabase.com>
References: <3f56456b@solutions.advantagedatabase.com>
Organization: ESI
X-Newsreader: MicroPlanet Gravity v2.30
NNTP-Posting-Host: 198.60.232.45
X-Trace: 4 Sep 2003 08:07:54 -0700, 198.60.232.45
Lines: 18
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!198.60.232.45
Xref: solutions.advantagedatabase.com Advantage.Delphi:13871
Article PK: 1107306

To create an ri rule we have to make sure a primary key exists for every
foreign key. To do this we need to open the tables exclusively.

J.D. Mullin
Advantage R&D

In article <3f56456b@solutions.advantagedatabase.com>, "Jeff Kreider"
<jeff(-at-)pctournaments.com> says...

> Why are indexes or tables opened when they are created within a dictionary?
> After creting both tables and indexes via SQL and then assigning the table
> properties, I had to disconnect the AdsConnection in order for the CreateRI
> function to work. Until I did this, I kept getting a 7039 and a 7008
> errors. I had to go to the error table to find the 7039 error.
>
> Jeff Kreider
>
>
>


"Jeff Kreider" Posted on 2003-09-04 15:43:48.0Z
From: "Jeff Kreider" <jeff(-at-)pctournaments.com>
Newsgroups: Advantage.Delphi
References: <3f56456b@solutions.advantagedatabase.com> <MPG.19c0f55871ce2419989b8a@solutions.advantagedatabase.com>
Subject: Re: Question On Creating indexes and RIs
Date: Thu, 4 Sep 2003 10:43:48 -0500
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 168.236.254.1
Message-ID: <3f575e12@solutions.advantagedatabase.com>
X-Trace: 4 Sep 2003 09:45:22 -0700, 168.236.254.1
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!168.236.254.1
Xref: solutions.advantagedatabase.com Advantage.Delphi:13875
Article PK: 1107308

Shouldn't the state of the table be returned to it's original setting after
the RI is created?

Jeff

"Jeremy D. Mullin" <jeremym@extendsys.com> wrote in message
news:MPG.19c0f55871ce2419989b8a@solutions.advantagedatabase.com...
> To create an ri rule we have to make sure a primary key exists for every
> foreign key. To do this we need to open the tables exclusively.
>
> J.D. Mullin
> Advantage R&D
>
> In article <3f56456b@solutions.advantagedatabase.com>, "Jeff Kreider"
> <jeff(-at-)pctournaments.com> says...
> > Why are indexes or tables opened when they are created within a
dictionary?
> > After creting both tables and indexes via SQL and then assigning the
table
> > properties, I had to disconnect the AdsConnection in order for the
CreateRI
> > function to work. Until I did this, I kept getting a 7039 and a 7008
> > errors. I had to go to the error table to find the 7039 error.
> >
> > Jeff Kreider
> >
> >
> >


Jeremy D. Mullin Posted on 2003-09-05 13:43:44.0Z
From: Jeremy D. Mullin <jeremym@extendsys.com>
Newsgroups: Advantage.Delphi
Subject: Re: Question On Creating indexes and RIs
Date: Fri, 5 Sep 2003 07:43:44 -0600
Message-ID: <MPG.19c240fa5ab88079989b8e@solutions.advantagedatabase.com>
References: <3f56456b@solutions.advantagedatabase.com> <MPG.19c0f55871ce2419989b8a@solutions.advantagedatabase.com> <3f575e12@solutions.advantagedatabase.com>
Organization: ESI
X-Newsreader: MicroPlanet Gravity v2.30
NNTP-Posting-Host: 198.60.232.45
X-Trace: 5 Sep 2003 07:43:35 -0700, 198.60.232.45
Lines: 15
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!198.60.232.45
Xref: solutions.advantagedatabase.com Advantage.Delphi:13889
Article PK: 1107323

In article <3f575e12@solutions.advantagedatabase.com>, "Jeff Kreider"
<jeff(-at-)pctournaments.com> says...

> Shouldn't the state of the table be returned to it's original setting after
> the RI is created?

They are. You said you're creating the RI after you did some other
things with the tables. The tables are probably still cache-closed, so
when the RI code tries to open them exclusive it can't.

There is a monthly tech tip on the web site about cached tables, check
that out. There is also a new TAdsConnection method in 7.0 called
CloseCachedTables that will make this process a little easier.

J.D. Mullin
Advantage R&D


"Jeff Kreider" Posted on 2003-09-05 15:22:53.0Z
From: "Jeff Kreider" <jeff(-at-)pctournaments.com>
Newsgroups: Advantage.Delphi
References: <3f56456b@solutions.advantagedatabase.com> <MPG.19c0f55871ce2419989b8a@solutions.advantagedatabase.com> <3f575e12@solutions.advantagedatabase.com> <MPG.19c240fa5ab88079989b8e@solutions.advantagedatabase.com>
Subject: Re: Question On Creating indexes and RIs
Date: Fri, 5 Sep 2003 10:22:53 -0500
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 168.236.254.1
Message-ID: <3f58aad1@solutions.advantagedatabase.com>
X-Trace: 5 Sep 2003 09:25:05 -0700, 168.236.254.1
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!168.236.254.1
Xref: solutions.advantagedatabase.com Advantage.Delphi:13893
Article PK: 1107329

Thanks J.D.
I'll take a look.

Jeff

"Jeremy D. Mullin" <jeremym@extendsys.com> wrote in message
news:MPG.19c240fa5ab88079989b8e@solutions.advantagedatabase.com...
> In article <3f575e12@solutions.advantagedatabase.com>, "Jeff Kreider"
> <jeff(-at-)pctournaments.com> says...
> > Shouldn't the state of the table be returned to it's original setting
after
> > the RI is created?
>
> They are. You said you're creating the RI after you did some other
> things with the tables. The tables are probably still cache-closed, so
> when the RI code tries to open them exclusive it can't.
>
> There is a monthly tech tip on the web site about cached tables, check
> that out. There is also a new TAdsConnection method in 7.0 called
> CloseCachedTables that will make this process a little easier.
>
> J.D. Mullin
> Advantage R&D