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.

Error 5131 When Creating A RI at Runtime

6 posts in Delphi Last posting was on 2003-09-03 15:53:55.0Z
"Jeff Kreider" Posted on 2003-09-02 03:36:52.0Z
From: "Jeff Kreider" <jeff -at- pctournaments REMOVE ME.com>
Newsgroups: Advantage.Delphi
Subject: Error 5131 When Creating A RI at Runtime
Date: Mon, 1 Sep 2003 22:36:52 -0500
Lines: 14
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: 66.188.90.85
Message-ID: <3f5410cd@solutions.advantagedatabase.com>
X-Trace: 1 Sep 2003 21:38:53 -0700, 66.188.90.85
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!66.188.90.85
Xref: solutions.advantagedatabase.com Advantage.Delphi:13828
Article PK: 1107265

When the following code executes I get an Error 5131. I created the RI in
ARC in order to make sure that I had everything that I needed. Then I used
the parameters from it to use in my code.

AdsDictionary.CreateRI('RecordDesc_List', '', 'Stats_Rec_Desc', 'primary',
'Stats_Rec', 'rectype_id', ADS_DD_RI_CASCADE, ADS_DD_RI_CASCADE);

What I don't understand is why I'm getting "The specified object ID is not a
valid database object ID" error?

--
Jeff Kreider


Jeremy D. Mullin Posted on 2003-09-02 14:20:50.0Z
From: Jeremy D. Mullin <jeremym@extendsys.com>
Newsgroups: Advantage.Delphi
Subject: Re: Error 5131 When Creating A RI at Runtime
Date: Tue, 2 Sep 2003 08:20:50 -0600
Message-ID: <MPG.19be552e439ee07b989b7f@solutions.advantagedatabase.com>
References: <3f5410cd@solutions.advantagedatabase.com>
Organization: ESI
X-Newsreader: MicroPlanet Gravity v2.30
NNTP-Posting-Host: 198.60.232.45
X-Trace: 2 Sep 2003 08:19:26 -0700, 198.60.232.45
Lines: 21
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!198.60.232.45
Xref: solutions.advantagedatabase.com Advantage.Delphi:13834
Article PK: 1107270

Is there more error text that accompanies the basic 5131 error text?
Does an object with the same name already exist in the database
(possibly from when you were testing it in ARC)?

J.D. Mullin
Advantage R&D


In article <3f5410cd@solutions.advantagedatabase.com>, "Jeff Kreider"
<jeff -at- pctournaments REMOVE ME.com> says...

> When the following code executes I get an Error 5131. I created the RI in
> ARC in order to make sure that I had everything that I needed. Then I used
> the parameters from it to use in my code.
>
> AdsDictionary.CreateRI('RecordDesc_List', '', 'Stats_Rec_Desc', 'primary',
> 'Stats_Rec', 'rectype_id', ADS_DD_RI_CASCADE, ADS_DD_RI_CASCADE);
>
> What I don't understand is why I'm getting "The specified object ID is not a
> valid database object ID" error?
>
>


"Jeff Kreider" Posted on 2003-09-02 15:55:49.0Z
From: "Jeff Kreider" <jeff(-at-)pctournaments.com>
Newsgroups: Advantage.Delphi
References: <3f5410cd@solutions.advantagedatabase.com> <MPG.19be552e439ee07b989b7f@solutions.advantagedatabase.com>
Subject: Re: Error 5131 When Creating A RI at Runtime
Date: Tue, 2 Sep 2003 10:55:49 -0500
Lines: 58
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: <3f54bdd4@solutions.advantagedatabase.com>
X-Trace: 2 Sep 2003 09:57:08 -0700, 168.236.254.1
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!168.236.254.1
Xref: solutions.advantagedatabase.com Advantage.Delphi:13838
Article PK: 1107276

The entire message is, "Project demo.exe raised exception class
EADSDatabaseError with message 'Error 5131: The specified object ID is not a
valid database object ID. No primary key was found for the given table.'
Use Step or Run to continue."

Before I create the RI, I did the following:
- set AdsDictionary.Active = true
- see if the tables exist in the dictionary via AdsServer.GetTableNames
- created the 2 tables (stats_rec_desc and stats_rec) and indexes
(stats_rec_desc -> PRIMARY and stats_rec -> PRIMARY and RECTYPE_ID) via SQL
(I used the 'Export Table Structures to Code' ARC menu option for the SQL
info
- set AdsDictionary.Active = false
- set AdsDictionary.Active = true
- set the permisions to both tables via AdsDictionary.GrantPermissions
- See if RI exists via AdsDictionary.GetRINames
- Create the RI via AdsDictonary.CreatRI

When I check the dictionary via ARC for these tables and their indexes, both
exist as they are supposed to. The RI doesn't exist. I activated and
deactivated the AdsDictionary in hopes that it would refresh what was seen
at runtime, but it seems as though my attempt at this was unsuccessful.

The tables and RI do not exist in the dictionary nor on the hard drive
before I run the program. There should only be one RI object in the
dictionary when everything works.

Jeff Kreider

"Jeremy D. Mullin" <jeremym@extendsys.com> wrote in message
news:MPG.19be552e439ee07b989b7f@solutions.advantagedatabase.com...
> Is there more error text that accompanies the basic 5131 error text?
> Does an object with the same name already exist in the database
> (possibly from when you were testing it in ARC)?
>
> J.D. Mullin
> Advantage R&D
>
>
> In article <3f5410cd@solutions.advantagedatabase.com>, "Jeff Kreider"
> <jeff -at- pctournaments REMOVE ME.com> says...
> > When the following code executes I get an Error 5131. I created the RI
in
> > ARC in order to make sure that I had everything that I needed. Then I
used
> > the parameters from it to use in my code.
> >
> > AdsDictionary.CreateRI('RecordDesc_List', '', 'Stats_Rec_Desc',
'primary',
> > 'Stats_Rec', 'rectype_id', ADS_DD_RI_CASCADE, ADS_DD_RI_CASCADE);
> >
> > What I don't understand is why I'm getting "The specified object ID is
not a
> > valid database object ID" error?
> >
> >


Jeremy D. Mullin Posted on 2003-09-03 14:45:20.0Z
From: Jeremy D. Mullin <jeremym@extendsys.com>
Newsgroups: Advantage.Delphi
Subject: Re: Error 5131 When Creating A RI at Runtime
Date: Wed, 3 Sep 2003 08:45:20 -0600
Message-ID: <MPG.19bfac6cd3ee32a9989b85@solutions.advantagedatabase.com>
References: <3f5410cd@solutions.advantagedatabase.com> <MPG.19be552e439ee07b989b7f@solutions.advantagedatabase.com> <3f54bdd4@solutions.advantagedatabase.com>
Organization: ESI
X-Newsreader: MicroPlanet Gravity v2.30
NNTP-Posting-Host: 198.60.232.45
X-Trace: 3 Sep 2003 08:44:43 -0700, 198.60.232.45
Lines: 15
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!198.60.232.45
Xref: solutions.advantagedatabase.com Advantage.Delphi:13852
Article PK: 1107288

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

> The entire message is, "Project demo.exe raised exception class
> EADSDatabaseError with message 'Error 5131: The specified object ID is not a
> valid database object ID. No primary key was found for the given table.'
> Use Step or Run to continue."

You have not defined a primary key for the table. Add a call to
AdsDictionary.SetTableProperty using the ADS_DD_TABLE_PRIMARY_KEY
option.

J.D. Mullin
Advantage R&D


"Jeff Kreider" Posted on 2003-09-03 15:53:55.0Z
From: "Jeff Kreider" <jeff(-at-)pctournaments.com>
Newsgroups: Advantage.Delphi
References: <3f5410cd@solutions.advantagedatabase.com> <MPG.19be552e439ee07b989b7f@solutions.advantagedatabase.com> <3f54bdd4@solutions.advantagedatabase.com> <MPG.19bfac6cd3ee32a9989b85@solutions.advantagedatabase.com>
Subject: Re: Error 5131 When Creating A RI at Runtime
Date: Wed, 3 Sep 2003 10:53:55 -0500
Lines: 25
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: <3f560f07@solutions.advantagedatabase.com>
X-Trace: 3 Sep 2003 09:55:51 -0700, 168.236.254.1
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!168.236.254.1
Xref: solutions.advantagedatabase.com Advantage.Delphi:13859
Article PK: 1107297

Thanks. That was it.

Jeff

"Jeremy D. Mullin" <jeremym@extendsys.com> wrote in message
news:MPG.19bfac6cd3ee32a9989b85@solutions.advantagedatabase.com...
> In article <3f54bdd4@solutions.advantagedatabase.com>, "Jeff Kreider"
> <jeff(-at-)pctournaments.com> says...
> > The entire message is, "Project demo.exe raised exception class
> > EADSDatabaseError with message 'Error 5131: The specified object ID is
not a
> > valid database object ID. No primary key was found for the given
table.'
> > Use Step or Run to continue."
>
>
> You have not defined a primary key for the table. Add a call to
> AdsDictionary.SetTableProperty using the ADS_DD_TABLE_PRIMARY_KEY
> option.
>
> J.D. Mullin
> Advantage R&D
>


"Jeff Kreider" Posted on 2003-09-02 15:58:36.0Z
From: "Jeff Kreider" <jeff(-at-)pctournaments.com>
Newsgroups: Advantage.Delphi
References: <3f5410cd@solutions.advantagedatabase.com> <MPG.19be552e439ee07b989b7f@solutions.advantagedatabase.com>
Subject: Re: Error 5131 When Creating A RI at Runtime
Date: Tue, 2 Sep 2003 10:58:36 -0500
Lines: 31
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: <3f54be7c@solutions.advantagedatabase.com>
X-Trace: 2 Sep 2003 09:59:56 -0700, 168.236.254.1
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!168.236.254.1
Xref: solutions.advantagedatabase.com Advantage.Delphi:13840
Article PK: 1107278

I forgot to mention that I am using version 6.2.

"Jeremy D. Mullin" <jeremym@extendsys.com> wrote in message
news:MPG.19be552e439ee07b989b7f@solutions.advantagedatabase.com...
> Is there more error text that accompanies the basic 5131 error text?
> Does an object with the same name already exist in the database
> (possibly from when you were testing it in ARC)?
>
> J.D. Mullin
> Advantage R&D
>
>
> In article <3f5410cd@solutions.advantagedatabase.com>, "Jeff Kreider"
> <jeff -at- pctournaments REMOVE ME.com> says...
> > When the following code executes I get an Error 5131. I created the RI
in
> > ARC in order to make sure that I had everything that I needed. Then I
used
> > the parameters from it to use in my code.
> >
> > AdsDictionary.CreateRI('RecordDesc_List', '', 'Stats_Rec_Desc',
'primary',
> > 'Stats_Rec', 'rectype_id', ADS_DD_RI_CASCADE, ADS_DD_RI_CASCADE);
> >
> > What I don't understand is why I'm getting "The specified object ID is
not a
> > valid database object ID" error?
> >
> >