Cannot update table with Informix OLE DB Provider
Posted in 1999
Topics: Networking & sqlhosts Configuration, Versions, Editions & End-of-Life
Hi Informixers, I'm having big trouble trying to build a very simple application with VB6, using ADO and Informix's OLE DB Provider. All I want to achieve is a simple view of a table with the possibility to update that table. Even when I do no programming at all, just create a data source that accesses a IDS 7.30 database via TCP/IP, I can select and view any table in that database just fine, but when I try to update a single row, I get the following error: X42000:-201: Syntax error or access violation I have trouble describing this, since my VB6 programming environment is in German and I don't know how to translate all the "VB6 speak" into English. I suppose, however, that anyone who knows VB6 will know what I mean. I already have a couple of applications running that use ADO and the Ifx OLE DB Provider. Now I tried a "quick and dirty" solution and it failed. Regards, Richard -- +--------------------------+------------------------------------------+ | Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de | | EDV-Gruppe Anaesthesie | Tel : +49-89-7095-6110 | | Klinikum Grosshadern | FAX : +49-89-7095-6420 <-- NEW!!! | | 81366 Munich, Germany | GSM : +49-172-8933578 | +--------------------------+------------------------------------------+
Richard, Please post table definition and VB code. Thanks Richard Spitz <Richard.Spitz@ana.med.uni-muenchen.de> wrote in message news:37A5DC9D.4E7D9714@ana.med.uni-muenchen.de... > Hi Informixers, > > I'm having big trouble trying to build a very simple application with > VB6, using ADO and Informix's OLE DB Provider. > > All I want to achieve is a simple view of a table with the possibility > to update that table. > > Even when I do no programming at all, just create a data source that > accesses a IDS 7.30 database via TCP/IP, I can select and view any table in > that database just fine, but when I try to update a single row, I get > the following error: > > X42000:-201: Syntax error or access violation > > I have trouble describing this, since my VB6 programming environment is > in German and I don't know how to translate all the "VB6 speak" into English. > I suppose, however, that anyone who knows VB6 will know what I mean. > > I already have a couple of applications running that use ADO and the Ifx > OLE DB Provider. Now I tried a "quick and dirty" solution and it failed. > > Regards, Richard > -- > +--------------------------+------------------------------------------+ > | Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de | > | EDV-Gruppe Anaesthesie | Tel : +49-89-7095-6110 | > | Klinikum Grosshadern | FAX : +49-89-7095-6420 <-- NEW!!! | > | 81366 Munich, Germany | GSM : +49-172-8933578 | > +--------------------------+------------------------------------------+
Leopold The Cat wrote:
> Please post table definition and VB code.
The problem is, there is code!
As an example, I have the following table:
create table "verteil".vbtest
(
satznr smallint not null ,
name char(20),
anzahl smallint
);
revoke all on "verteil".vbtest from "public";
create unique index "verteil".ix522_1 on "verteil".vbtest (satznr);
insert into vbtest values (1,"First Row", NULL);
insert into vbtest values (2,"Second Row", NULL);
insert into vbtest values (3,"Third Row", NULL);
insert into vbtest values (4,"Fourth Row", NULL);
Then I start VB6, open a new project and click on the symbol that looks like
a yellow pie with a handle attached to it. The caption that appears when the
cursor is above it is "Datenansichtsfenster" in German, which translates into
"Data view window" in English.
Now a window opens that shows the available data links. I have one on the
database with the above test table, which shows when I click on "Tables".
Before that, I have to enter the password for the user id shown.
The properties of that data link are:
property value
fIsProjectUnderVCS false
Name Provider=Ifxoledbc.2;Persist Security Info=False;User
ID=xxxxx;Data Source=xxxxx@xxserver;Extended
Properties="";Connect Timeout=10
Owner xxxxx <same as user id above>
A double click on the table name "vbtest" will open another window with
the title (translated): Execute table: vbtest
In this window, I can see a grid with the four rows that are already in the
table. When I click into any of the fields and type something, the arrow
marking the current row changes into a pen, denoting that the current
row is being changed. When I leave that row, an error window pops up
with the message:
X42000:-201: Syntax error or access violation
Please note that the user id I entered has all necessary privileges to
connect to the database and manipulate data in the test table.
I am at my wit's end. I had hoped that I could build a "quick and dirty"
app to update some data in a table without having to code much, but now
I've already spent more time chasing the problem than if I had hand-coded
a program from the beginning.
Regards, Richard
--
+--------------------------+------------------------------------------+
| Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de |
| EDV-Gruppe Anaesthesie | Tel : +49-89-7095-6110 |
| Klinikum Grosshadern | FAX : +49-89-7095-6420 <-- NEW!!! |
| 81366 Munich, Germany | GSM : +49-172-8933578 |
+--------------------------+------------------------------------------+
Richard Spitz wrote: > > Leopold The Cat wrote: > > Please post table definition and VB code. > > The problem is, there is code! Ooops, it should read correctly: The problem is, there is NO code! Anyway, it now works when DELIMIDENT is set to "y". Regards, Richard -- +--------------------------+------------------------------------------+ | Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de | | EDV-Gruppe Anaesthesie | Tel : +49-89-7095-6110 | | Klinikum Grosshadern | FAX : +49-89-7095-6420 <-- NEW!!! | | 81366 Munich, Germany | GSM : +49-172-8933578 | +--------------------------+------------------------------------------+