Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: IBConsole primary key



Permlink Replies: 5 - Last Post: Apr 14, 2016 9:40 AM Last Post By: Jeff Overcash (... Threads: [ Previous | Next ]
Marcello Lenci

Posts: 40
Registered: 1/30/16
IBConsole primary key
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 10, 2016 6:36 AM
'm making an application with Delphi 10 which uses an interbase database with 5 tables.
I put 1 FDConnection, 1 FDTransaction and 5 FDTables all connected to the same FDConnection.
Without a primary key on the tables all goes well.
If I, with IBConsole, set a primary key on an existing field, often (not always) I get the message "column unknown A.<field name>".
My questions are:
1 - who attaches "A." to the name of the field and why ?
2 -How can I solve the problem? (Sometimes, not always, I solve it erasing the index and making it again)
What make me crazy is that I can't find a logical behavior.
Thank you for your help.
Marcello Lenci

Posts: 40
Registered: 1/30/16
Re: IBConsole primary key
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 12, 2016 6:55 AM   in response to: Marcello Lenci in response to: Marcello Lenci
Marcello Lenci wrote:
'm making an application with Delphi 10 which uses an interbase database with 5 tables.
I put 1 FDConnection, 1 FDTransaction and 5 FDTables all connected to the same FDConnection.
Without a primary key on the tables all goes well.
If I, with IBConsole, set a primary key on an existing field, often (not always) I get the message "column unknown A.<field name>".
My questions are:
1 - who attaches "A." to the name of the field and why ?
2 -How can I solve the problem? (Sometimes, not always, I solve it erasing the index and making it again)
What make me crazy is that I can't find a logical behavior.
Thank you for your help.
As noby gave me an answer, I add two questions:
- the problem raises if I put more than 2 primary key in more then 2 tables of the same database
- why, in IBConsole, in the table list there several files RDB$... e TMP$...
Is it normal ? Is that in some relation with my problem ?
Jeff Overcash (...

Posts: 1,529
Registered: 9/23/99
Re: IBConsole primary key
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 12, 2016 9:57 AM   in response to: Marcello Lenci in response to: Marcello Lenci
Marcello Lenci wrote:
Marcello Lenci wrote:
'm making an application with Delphi 10 which uses an interbase database with 5 tables.
I put 1 FDConnection, 1 FDTransaction and 5 FDTables all connected to the same FDConnection.
Without a primary key on the tables all goes well.
If I, with IBConsole, set a primary key on an existing field, often (not always) I get the message "column unknown A.<field name>".
My questions are:
1 - who attaches "A." to the name of the field and why ?
2 -How can I solve the problem? (Sometimes, not always, I solve it erasing the index and making it again)
What make me crazy is that I can't find a logical behavior.
Thank you for your help.
As noby gave me an answer, I add two questions:
- the problem raises if I put more than 2 primary key in more then 2 tables of the same database
- why, in IBConsole, in the table list there several files RDB$... e TMP$...
Is it normal ? Is that in some relation with my problem ?

Please provide a script to reproduce this and I'll look into it further. I have
many databases with multiple tables with multi-key primary key tables without issue.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Marcello Lenci

Posts: 40
Registered: 1/30/16
Re: IBConsole primary key
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 14, 2016 1:21 AM   in response to: Jeff Overcash (... in response to: Jeff Overcash (...
Thank you very much for responding to my question. I don't have a script for this project, unless I don't understand what you mean by script. I think I'll try a few more things, and if I don't succeed, I can send you the whole project, if that's all right with you. Thanks again, Marcello Lenci

Jeff Overcash (TeamB) wrote:
Marcello Lenci wrote:
Marcello Lenci wrote:
'm making an application with Delphi 10 which uses an interbase database with 5 tables.
I put 1 FDConnection, 1 FDTransaction and 5 FDTables all connected to the same FDConnection.
Without a primary key on the tables all goes well.
If I, with IBConsole, set a primary key on an existing field, often (not always) I get the message "column unknown A.<field name>".
My questions are:
1 - who attaches "A." to the name of the field and why ?
2 -How can I solve the problem? (Sometimes, not always, I solve it erasing the index and making it again)
What make me crazy is that I can't find a logical behavior.
Thank you for your help.
As noby gave me an answer, I add two questions:
- the problem raises if I put more than 2 primary key in more then 2 tables of the same database
- why, in IBConsole, in the table list there several files RDB$... e TMP$...
Is it normal ? Is that in some relation with my problem ?

Please provide a script to reproduce this and I'll look into it further. I have
many databases with multiple tables with multi-key primary key tables without issue.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jeff Overcash (...

Posts: 1,529
Registered: 9/23/99
Re: IBConsole primary key
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 14, 2016 9:40 AM   in response to: Marcello Lenci in response to: Marcello Lenci
Marcello Lenci wrote:
Thank you very much for responding to my question. I don't have a script for this project, unless I don't understand what you mean by script. I think I'll try a few more things, and if I don't succeed, I can send you the whole project, if that's all right with you. Thanks again, Marcello Lenci

Just a SQL script to create the tables etc to demonstrate the problem.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
quinn wildman

Posts: 156
Registered: 4/20/07
Re: IBConsole primary key
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 13, 2016 6:50 PM   in response to: Marcello Lenci in response to: Marcello Lenci
Marcello Lenci wrote:
1 - who attaches "A." to the name of the field and why ?

It sounds like A. is an alias. I've seen reporting tools do this as an
easy way to uniquely reference a field in a table.

--
I used to work for Embarcadero - I don't work there any more.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02