strange database-problem
Posted in 2003
Topics: Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
I am using: INFORMIX-4GL Version 1.10.00B/2.10.00B
Copyright (C) 1986-1987 Informix Software, Inc.
My Problem: Problems with changing the database:
"Incorrect database or cursor name format"
The program is compiled at a computer running on XENIX (UNIX),
The application is running on LINUX RedHat 7.3
My program is using many tables. The majority of tables are situated in the
database "arzt.dbs". The old tables are situated in the database
"daten-alt".
To shift datas from the database arzt to daten_alt I used to use the command
"DATABASE daten_alt" to put them into a table in this database and
"DATABASE arzt" to go back to the previeous database to fetch the next row.
This worked fine for years.
Since some time it does not work more. The following error occures:
Program stopped at "datSicher1.4gl", line number 790.
SQL statement error number -354.
ISAM error number 0.Incorrect database or cursor name format OR
something like: incorrect message from the sql-process.
(depending where the program is running (XENIX OR LINUX) ??)
datSicher1.4gl:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
...
INITIALIZE his_max_znr,beh_min_znr,auslagerJahr,auslagerZNR TO NULL
line 790 ----> DATABASE arzt
SELECT max(znr)
INTO beh_max_znr
FROM behandlung
WHERE karteinr = p_patient.karteinr
...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Running this command "DATABASE arzt" through the isql-Menu does change the
database correctly.
But running the same command within an application.4ge the error
"Incorrect database or cursor name format" occures.
Informix isql-Menu:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
RDSQL: New <Run> Modify Use-editor Output Choose Save Info Drop
Exit
Run the current RDSQL statements.
----------------------- daten_alt--------------- Press CTRL-W for
DATABASE arzt
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Within a very simple program, where I do not use a global-file I can do the
command "DATABASE arzt" and it works.
In the other applications, where I use a global file and many other
4gl-files
the problem does only occure when doing the command "DATABASE arzt", not
with
the command "DATABASE daten_alt" or "DATABASE standards" or DATABASE
statistiks"
I could solve the problem by avoyding to have two or more databases. But
since I have situated 100 tables in arzt.dbs I cannot situate more than
that in this
database. Otherwise the database would not be shown well, like this:
<''''''''''''ata1 > instaed of <abrdata1>
The database was started:
START DATABASE arzt WITH LOG IN "/usr/informix/transaction"
Does anyone know, how I can find a solution for this strange problem.
thank you very much.
Philipp
Philipp Walderdorff wrote:
> I am using: INFORMIX-4GL Version 1.10.00B/2.10.00B
> Copyright (C) 1986-1987 Informix Software, Inc.
Wait - timeout. That's been out of date since 1989. Not
Y2K-compliant. Not supported. Ouch!!! Why? It doesn't know about
Turbo, let alone OnLine, or IDS, or IUS, or ... It doesn't know about
DATETIME or INTERVAL types, nor VARCHAR.
> My Problem: Problems with changing the database:
> "Incorrect database or cursor name format"
>
> The program is compiled at a computer running on XENIX (UNIX),
> The application is running on LINUX RedHat 7.3
That's pretty amazing testimony to both Xenix and Linux. When the
software was released, you could get nice high-end 80286's running at
a dozen MHz, and maybe a few 80386's running at immense speeds such as
25 MHz!
> My program is using many tables. The majority of tables are situated in the
> database "arzt.dbs". The old tables are situated in the database
> "daten-alt".
> To shift datas from the database arzt to daten_alt I used to use the command
> "DATABASE daten_alt" to put them into a table in this database and
> "DATABASE arzt" to go back to the previeous database to fetch the next row.
> This worked fine for years.
Not very fast, I fear. It would probably be quicker (by orders of
magnitude) to use an UNLOAD and LOAD command.
> Since some time it does not work more. The following error occures:
So, what did you change between the time when it was working and the
time when it stopped working? Something must have changed; computers
seldom stop working just because of the passage of time.
> Program stopped at "datSicher1.4gl", line number 790.
> SQL statement error number -354.
> ISAM error number 0.> Incorrect database or cursor name format OR
> something like: incorrect message from the sql-process.
> (depending where the program is running (XENIX OR LINUX) ??)
Which is which? I'd guess 'incorrect message' is on Xenix.
> datSicher1.4gl:
> vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
> ...
> INITIALIZE his_max_znr,beh_min_znr,auslagerJahr,auslagerZNR TO NULL
>
> line 790 ----> DATABASE arzt
>
> SELECT max(znr)
> INTO beh_max_znr
> FROM behandlung
> WHERE karteinr = p_patient.karteinr
> ...
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Running this command "DATABASE arzt" through the isql-Menu does
> change the database correctly. But running the same command within
> an application.4ge the error "Incorrect database or cursor name
> format" occures.
>
[...snip...]
>
> Within a very simple program, where I do not use a global-file I
> can do the command "DATABASE arzt" and it works.
>
> In the other applications, where I use a global file and many other
> 4gl-files the problem does only occure when doing the command
> "DATABASE arzt", not with the command "DATABASE daten_alt" or
> "DATABASE standards" or DATABASE statistiks"
So what's different about arzt compared with the others? Which locale
is in use? Remember, the I4GL 1.10 code has almost no idea about
locales...
> I could solve the problem by avoyding to have two or more databases. But
> since I have situated 100 tables in arzt.dbs I cannot situate more than
> that in this
> database. Otherwise the database would not be shown well, like this:
> <''''ata1 > instaed of <abrdata1>
Yes, that old a version of I4GL does have problems with bigger
databases having more than 100 tables. Time to upgrade... We fixed
that bug nearly a decade ago.
> The database was started:
> START DATABASE arzt WITH LOG IN "/usr/informix/transaction"
>
>
> Does anyone know, how I can find a solution for this strange problem.
Since it worked, then stopped working, find out what changed
immediately prior to it stopping. Undo that change - or those changes.
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/
Thank you for answer. 1. The reason why I need this ancient version of INFORMIX: Because My program is written in it and has been working very fine since years. I do not have y2K-Problem in LINUX, everthing was working fine until this problem occured. 2. To move to a modern INFORMIX I qould not only have to invest a lot of money, but also I would have to invest a lot of time to learn the new features and to rewrite my program (about 2 MB source code!) 3. Just now I have solved the problem! :-) A verry verry silly little problem: I hardly want to tell: I used a variable called "arzt" !!!! This silly acient ystem could not tell me, that this word is used twice. Half a year I am thinking about this problem. Because of your answer I began to think more about it. Up to now I thought this was a strang problem that I cannot solve. Thanks for help. Philipp
Philipp Walderdorff <ph.walderdorff@gmx.at> wrote in message news:<3fe3390d$0$12034$91cee783@newsreader01.highway.telekom.at>... > Half a year I am thinking about this problem. Good grief. Time for a coffee ... Andy