cannot open table for live access. A single numeric key column is required on the table.

1,046 views
Skip to first unread message

Nomeneta Saili

unread,
Sep 28, 2011, 6:12:47 PM9/28/11
to mapi...@googlegroups.com
Hi people,

When i try to open my tables on PostGIS with a live link i get this
error message "cannot open table for live access. A single numeric key
column is required on the table". I have gone through a lot of
discussions on this forum and others as well and i read and tried the
solutions which unfortunately has not worked for me sofar.

I loaded my MapInfo table into my PostGIS (1.5/Postgres 8.4) database
using easy loader 10. The Map_catalog was created. The data was loaded
successfully.

There is an Integer column MI_PRINX which is also the primary key
inside the PostGIS table. So does anyone knows where the problem might
lie?.

Thanks,

Nome.

Nomeneta Saili

unread,
Sep 29, 2011, 5:02:52 PM9/29/11
to mapi...@googlegroups.com
Ok perhaps it was not clear enough. I am trying to open PostGIS tables
in my MapInfo 10 for dynamic access but i get this error "cannot open

table for live access. A single numeric key
column is required on the table". This table that i tried to open was
loaded into PostGIS using Easyloader 10 with an integer primary Key
'MI_PRINX'. From the past discussions it seems that there shouldn't be
any problem but alas there is one.

Need help with this

Thanks

Nome

Eric Blasenheim

unread,
Sep 29, 2011, 5:57:47 PM9/29/11
to MapInfo-L
Have you tried linked access. Does it give the same error (saying the
table is readonly)?

Eric Blasenheim
PBBI (MapInfo)
> > Nome.- Hide quoted text -
>
> - Show quoted text -

Nomeneta Saili

unread,
Sep 29, 2011, 7:41:42 PM9/29/11
to mapi...@googlegroups.com
What is linked access?. How do you do this link access to postGIS
tables?. Sorry i just moved from 8.5 to 10 recently and i am not aware
of any linked access.

> --
> You received this message because you are subscribed to the
> Google Groups "MapInfo-L" group.To post a message to this group, send
> email to mapi...@googlegroups.com
> To unsubscribe from this group, go to:
> http://groups.google.com/group/mapinfo-l/subscribe?hl=en
> For more options, information and links to MapInfo resources (searching
> archives, feature requests, to visit our Wiki, visit the Welcome page at
> http://groups.google.com/group/mapinfo-l?hl=en
>

Nomeneta Saili

unread,
Sep 29, 2011, 7:56:56 PM9/29/11
to mapi...@googlegroups.com
Oh wait yes. The link/download table is able to open into my MapInfo
10. It also prompts that i can not edit the table and to consult the
manual. I understand this option i am only able to view. Yes i am also
able to view in the mapper window.

It just the dynamic link as i want to be able to edit data on PostGIS
that is not working. The Map_Catelog table was created as well as the
Mapinfo Schema on postGIS.

Eric Blasenheim

unread,
Sep 29, 2011, 8:47:54 PM9/29/11
to MapInfo-L
So it is clear that Professional is not finding the index. Are you
using a dynamic view? That is, the "table" that you choose to work
with, is that a view? If so, the view (which is all Professional
knows about) must be listed in the catalog so that Professional knows
which column is the index. To verify this, try opening the actual
table and not the view and see if the error persists.

Eric Blasenheim
PBBI (MapInfo)
> >>http://groups.google.com/group/mapinfo-l?hl=en- Hide quoted text -

Nomeneta Saili

unread,
Sep 29, 2011, 10:05:39 PM9/29/11
to mapi...@googlegroups.com
I am using the base tables and not views. I didn't create any views. In the mapinfo_mapCatalog table in postGIS it already list the base table 'PL' that i have been trying to open dynamically without success.

The Easy Loader 10 stored my table in the public schema. Is this the right schema it suppose to store it in?. The only table in the MapInfo schema is the mapinfo_mapCatelog.

I notice though that there is no column for Primary Key in the mapinfo_mapcatelog table i.e. there is no column that list MI_PRINX as the primary key. It has Spatial type, spatialcolumn, coordinatesystem, reindetioncolumn etc but none for primary key.

In the base table in my public schema it list MI-PRINX as the primary key (table that i have been trying to open dynamically)

It really dose sounds like MapInfo dosen't know the primary key but there is already a primary key set with the constraints

"MI_PRINX" serial NOT NULL,
 "SP_GEOMETRY" geometry,
 CONSTRAINT "PL_pkey" PRIMARY KEY ("MI_PRINX"),

 CONSTRAINT "enforce_dims_SP_GEOMETRY" CHECK (st_ndims("SP_GEOMETRY") = 2),
 CONSTRAINT "enforce_srid_SP_GEOMETRY" CHECK (st_srid("SP_GEOMETRY") = 32702)
)
WITH (
 OIDS=FALSE
);
ALTER TABLE "PL" OWNER TO postgres;

-- Index: "SIndex_PL_SP_GEOMETRY"

-- DROP INDEX "SIndex_PL_SP_GEOMETRY";

CREATE INDEX "SIndex_PL_SP_GEOMETRY"
 ON "PL"
 USING gist
 ("SP_GEOMETRY");


Is there a way i can force MapInfo 10 to recognize MI_PRINX as the primary key?. 

Peter Horsbøll Møller

unread,
Sep 30, 2011, 3:21:08 AM9/30/11
to mapi...@googlegroups.com
I notice that you only have the MI_PRINX column and the Spatial column SP_GEOMETRY.
Could you try adding any extra column, for instance as column called NAME of type Char(20)

Peter Horsbøll Møller
Pitney Bowes Business Insight - MapInfo


2011/9/30 Nomeneta Saili <nome....@gmail.com>

kitex

unread,
Sep 30, 2011, 6:47:57 AM9/30/11
to MapInfo-L
There is lot of problem connecting mapinfo with posgis ( i have) . But
same will work fine with Qgis. I am wondering why is this problem.

On Sep 30, 12:21 pm, Peter Horsbøll Møller <mapinf...@horsboll-
moller.dk> wrote:
> I notice that you only have the MI_PRINX column and the Spatial column
> SP_GEOMETRY.
> Could you try adding any extra column, for instance as column called NAME of
> type Char(20)
>
> Peter Horsbøll Møller
> Pitney Bowes Business Insight - MapInfo
>
> 2011/9/30 Nomeneta Saili <nome.sa...@gmail.com>
> > On Thu, Sep 29, 2011 at 2:47 PM, Eric Blasenheim <eric.blasenh...@pb.com>
> > >> >>http://groups.google.com/group/mapinfo-l?hl=en-Hide quoted text -

Nomeneta Saili

unread,
Oct 1, 2011, 1:18:43 AM10/1/11
to mapi...@googlegroups.com
Hi Peter,

Tried to add the column as request but i get this error

SQL error:

ERROR:  type modifier is not allowed for type "char"
LINE 1: ALTER TABLE "public"."PL" ADD COLUMN "NAME" "char"(20)
                                                    ^

In statement:
ALTER TABLE "public"."PL" ADD COLUMN "NAME" "char"(20)

What does this means?. I can add other datatype but not "char". I have already set all the privileges.

Thanks

Nome

peter horsboll moller

unread,
Oct 1, 2011, 2:09:23 AM10/1/11
to mapi...@googlegroups.com
Well, I'm not a PostGIS expert, so maybe there is no Char column type. My intention was just to have another column in the table besides the index an the spatial column.
If you can add a column of a different type, please try that.

Peter



Fra: Nomeneta Saili <nome....@gmail.com>
Sendt: 1. oktober 2011 07:18
Til: mapi...@googlegroups.com
Emne: Re: [MI-L] Re: cannot open table for live access. A single numeric key column is required on the table.


Hi Peter,

Tried to add the column as request but i get this error

SQL error:

ERROR:  type modifier is not allowed for type "char"
LINE 1: ALTER TABLE "public"."PL" ADD COLUMN "NAME" "char"(20)
                                                    ^

In statement:
ALTER TABLE "public"."PL" ADD COLUMN "NAME" "char"(20)

What does this means?. I can add other datatype but not "char". I have already set all the privileges.

Thanks

Nome


On Fri, Sep 30, 2011 at 12:47 AM, kitex <udhyan...@gmail.com> wrote:
There is lot of problem connecting mapinfo with posgis ( i have) . But
same will work fine with Qgis. I am wondering why is this problem.

On Sep 30, 12:21 pm, Peter Horsbøll Møller <mapinf...@horsboll-
moller.dk> wrote:
> I notice that you only have the MI_PRINX column and the Spatial column
> SP_GEOMETRY.
> Could you try adding any extra column, for instance as column called NAME of
> type Char(20)
>
> Peter Horsbøll Møller
> Pitney Bowes Business Insight - MapInfo
>
> 2011/9/30 Nomeneta Saili <


[Hele den oprindelige meddelelse er ikke inkluderet]

Nomeneta Saili

unread,
Oct 1, 2011, 2:52:40 AM10/1/11
to mapi...@googlegroups.com
Ok, added column NAME Type Character (20). Do i use this as the primary key for MapInfo to know?. 

--

peter horsboll moller

unread,
Oct 1, 2011, 3:09:12 AM10/1/11
to mapi...@googlegroups.com
No, keep your MI_PRINX as your primary index column.

Peter



Fra: Nomeneta Saili <nome....@gmail.com>
Sendt: 1. oktober 2011 08:52
Til: mapi...@googlegroups.com
Emne: Re: Re: [MI-L] Re: cannot open table for live access. A single numeric key column is required on the table.


Ok, added column NAME Type Character (20). Do i use this as the primary key for MapInfo to know?. 

On Fri, Sep 30, 2011 at 8:09 PM, peter horsboll moller <p.horsbo...@gmail.com> wrote:
Well, I'm not a PostGIS expert, so maybe there is no Char column type. My intention was just to have another column in the table besides the index an the spatial column.
If you can add a column of a different type, please try that.

Peter



Fra: Nomeneta Saili <nome....@gmail.com>
Sendt: 1. oktober 2011 07:18
Til: mapi...@googlegroups.com
Emne: Re: [MI-L] Re: cannot open table for live access. A single numeric key column is required on the table.


Hi Peter,

Tried to add the column as request but i get this error



Bill Thoen

unread,
Oct 1, 2011, 11:35:38 AM10/1/11
to mapi...@googlegroups.com
Try "char(20)", or just plain char(20), or use the full spelling, 
character(20), but quoting only the first part of the type definitely 
will give you an error. 
--
Reply all
Reply to author
Forward
0 new messages