Re: VB Read only problem with Informix.. HELP!!!!
Posted in 1997
It may be the indexing problem seen in MS Access. If you use DAO in VB
that is likely. If you use RDO as you should for speed reasons
(significantly faster database access) it is less likely.
In any case, if this is the problem you fix it like this:
First you need a primary key.
Second you should declare it as follows:
create tabel tabelname(
somecolumn sometype, { The primary key }
....
);
create unique index tabelname_primary on tabelname (somecolumn);
alter table tabelname add constraint primary key (somecolumn)
constraint tabelname_primkey;
to avoid any problems with Informix generated constraint names
starting with a space.
This way of defining a primary key also have the advantage of making
it possible to drop and recreate the index independently of the
primary key constraint.
smvaidya@auto.rockwell.com wrote:
:Hi,
:We have been accessing the Informix OnLine version 7 DB via
:VB(in NT)-Intersolv ODBC(NT)-I/NET(NT)-Informix(UNIX) for over several months.
:Yesterday I created a new table in the same database and granted the
:privileges (SELECT, UPDATE, DELETE, INSERT) to all the required users.
:I tested the table for SELECT and INSERTS and it worked fine on the UNIX
:machine for me and another user. I created the table in dbaccess, checked
:the privileges and it looks good.
:However, when I access the table from VB it tells me that the table is
:read only and I cannot insert new records, however all the old tables are
:fine and work just fine and I can insert, select etc... any idea what needs
:to happen??? where ??? HELP!!! I have users on my tail asking me what wrong???
:H-E-L-P!!!!!!!!!
:If possible please reply directly to smvaidya@auto.rockwell.com else to the
:newsgroup. Thanks in advance...
:Sham Vaidya
Nils.Myklebust@idg.no
NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway
My opinions are those of my company
The Informix FAQ is at http://www.iiug.org