Solved

MapInfo: Cannot Open Table for Live Access

Posted on 2002-07-25
22
1,046 Views
Last Modified: 2010-08-05
I have a MS Access 97 SR-2 database with this table:
CREATE TABLE table1 (tab1_id COUNTER CONSTRAINT pk_table2 PRIMARY KEY, descr TEXT);
And this view/ query (named "view1"):
SELECT * FROM table1;

I wish to open a Live Access DBMS connection to view1 in MapInfo, but when I do that, I get this error message: "Cannot Open Table for Live Access. A single key column is required on the table. Unable to open view1."

I did find a few articles that shed a little light on the subject. My conclusion by reading this was that my view/ query needed a unique index in order to be accepted by MapInfo, but I'm not sure if this is possible and have no idea how to do it.

Can somebody help me solving this problem?

Here are the articles I found about the problem, you might find them useful.
http://testdrive.mapinfo.com/techsupp/miprod.nsf/d9c4e33650769aec852566bf00603719/df1d5d1eeeffe351ca256873001f417f?OpenDocument
http://www.mapinfo.com/registration/discussions/thread.jsp?forum=6&thread=1035&message=3338&q=live+access
http://mapinfo:ntok2b@betaftp.mapinfo.com/mapinfo/MI55/mipro55ug.exe (mapinfo Professional 5.5 User's Guide p. 403 "Every table must have a single unique key column")
0
Comment
Question by:tunheim
  • 10
  • 8
  • 3
  • +1
22 Comments
 
LVL 54

Expert Comment

by:nico5038
ID: 7178109
Your table 1 does have a unique key (tab1_id) when I create it, the problem might be the fact that the table hasn't been filled.

Did you use an INSERT query to append some rows?

Nic;o)
0
 
LVL 3

Expert Comment

by:gandalf94305
ID: 7183303
Could it be that your primary key field on "table1" needs to be called "MI_table1" (that's what I gathered from the first article you quoted)?

--g.
0
 
LVL 28

Expert Comment

by:TextReport
ID: 7183936
Can you link direct to the table, the article states the view needs the index as in SQL Server and Oracle where you can create indexes on views. This is not possible in Access and although your table has the index the query may not be presenting it to MapInfo when it attaches to the query.

Another point is the name of the unique key, the Primary Key in Access is defaulted to PrimaryKey, MapInfo needs MY_PRINDX, well something like that, it is in the first article.

Cheers, Andrew
0
 

Author Comment

by:tunheim
ID: 7187658
nico5038:
The table is filled with a few exaple rows, I just didn't bother to include it in my post.

TextReport:
No, I can't link direct to the table. From my example it seems very silly to use a query, but this is just a testing data base I've made to illustrate the problem and avoid confusion.
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7187771
Just a thought, did you try:
SELECT tab1_id  FROM table1;
in your view ?

Nic;o)
0
 

Author Comment

by:tunheim
ID: 7188226
nico5038: Yes, I did.
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7188334
OK, new try:

select tab1_id AS MI_PRINX, * from table1;

Nic;o)
0
 

Author Comment

by:tunheim
ID: 7193396
gandalf94305: Didn't work. It didn't seem to have any effect.

nico5038: Didn't work. It didn't seem to have any effect.
0
 

Author Comment

by:tunheim
ID: 7193399
TextReport: What would you do to make Access name the unique index MY_PRINDX instead of PrimaryKey?
0
 
LVL 28

Expert Comment

by:TextReport
ID: 7193452
You can go into the table design in Access, bring up the Indexes dialog and rename the index there. I am not sure how or if you can do this in DDL.

Cheers, Andrew
0
 

Author Comment

by:tunheim
ID: 7195643
TextReport: This is how you'd do it in DDL. Unfortunately neither of these worked.

(naming the PK attribute MI_PRINX)
CREATE TABLE table1 (MI_PRINX COUNTER CONSTRAINT PrimaryKey PRIMARY KEY,
description TEXT);

(naming the unique index MI_PRINX)
CREATE TABLE table1 (tab_id COUNTER CONSTRAINT MI_PRINX PRIMARY KEY,
description TEXT);

(naming the PK attribute and the unique index MI_PRINX)
CREATE TABLE table1 (MI_PRINX COUNTER CONSTRAINT MI_PRINX PRIMARY KEY,
description TEXT);
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 54

Expert Comment

by:nico5038
ID: 7195939
Then I guess the "final" step is to drop a Q at mapinfo...

Nic;o)
0
 

Author Comment

by:tunheim
ID: 7196175
The problem is that the pricing of their support scheme aims for company accounts not student wallets.
0
 
LVL 28

Expert Comment

by:TextReport
ID: 7196529
That's me done, I don't know what else to try except, have you still got the alias on the field?

Cheers, Andrew
0
 

Author Comment

by:tunheim
ID: 7200693
TextReport:
Tried the aliasses. Did no difference.

I've been searching around in some old archives of a MapInfo mailing list, and it seems people have been struggling with this problem before. I'm fearing that there is no sollution to this.
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7201067
And what about the "reverse" way.
Just import the mapinfo data into access ?

Nic;o)
0
 

Author Comment

by:tunheim
ID: 7228631
>And what about the "reverse" way.
>Just import the mapinfo data into access ?

What do you mean?
The data is already in access, I'm using MapInfo as a viewer.
0
 
LVL 54

Accepted Solution

by:
nico5038 earned 500 total points
ID: 7230877
I mean to "send" the data to mapinfo c.q. to steer mapinfo from access. Does the application take input parameters?

Nic;o)
0
 

Author Comment

by:tunheim
ID: 7232799
Yes, I guess so. You can even run Basic commands on it (MapBasic).
So you mean to have an external program (like access) to push the data into MapInfo every now and then?
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7233126
Yep ;-)

Nic;o)
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7347442

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 

Author Comment

by:tunheim
ID: 7355484
After fiddling around I agree that this seems to be the only sollution if I want to use Access and MapInfo in this way.

On the other hand, I think I'll rather set up a postgresql server or something.

Thanks for an answer on a difficult question.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Creating and Managing Databases with phpMyAdmin in cPanel.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now