RE: 4gl Quesions (EASY, I hope...)
Posted in 1996
John:
1) Sorry, but you can't do it. LOAD is a 4gl statement (as opposed to an SQL
statement), so you can neither prepare it nor supply char variables for tables
names (etc, etc)
2) Be more specific with your error message. Who tries to access the table?
Has he got any right on the table? I assume the user who creates the table has
RESOURCE access to the database, otherwise he would have got an error when
trying to create the table.
I also assume you are not trying to create temp tables, otherwise you are out
of luck: temp tables are only visible by the process that creates them.
3) You'll have to drop the display array and use an input array instead, with
all noentry fields but the last (dummy) one.
you would then
before field dummy
let p=arr_curr()
let s=scr_line()
display your_array[p].* to you_screen_array[s].*
attribute(reverse)
after field dummy
let p=arr_curr()
let s=scr_line()
display your_array[p].* to you_screen_array[s].*
4) Again, be more specific. What do you mean by "FOREACH loses the
cursor position"? This seems to imply that you can do singleton selects, and
that therefore your connection is set up correctly, right?
Happy Holidays,
Marco
____________________________________________________________________________
rem radioterapia, which I immeritately manage, seldom agrees with what I say
marco greco (Catania, Italy) Work:
marcog@ctonline.it rem radioterapia 39 95 447828 fax 446558
(was mar.greco@agora.stm.it) Achea 39 95 503117
--- On Mon, 23 Dec 1996 23:53:20 -0500 John Cokos <jcokos@ix.netcom.com>
wrote:
I have a couple of "simple" 4gl questions for the gurus out there...
1. If a user enters in a table name on a form ( into a variable called
cTableName ),
how can I do the following:
LOAD FROM "converted.unl" INSERT INTO cTableName
Informix tells me that the table cTableName does not exist.
2. How do you create a table in 4gl. I have a "basic" table setup in my
system. I have
a menu item that allows the user to "clone" the table. When they select
this item,
I do the following:
LET cSQL = "CREATE TABLE ", cTable CLIPPED,
"(",
"column1 char(2),
" ..."
")"
PREPARE goSQL FROM cSQL
EXECUTE goSQL
The code works. The table is created. It shows up in Systables. It
shows up in ISQL in the
big list of tables. However, I cannot access it. I get the error:
Table not in database.
HELP!!!!
3. If I call a pop-up window and populate it with display array....the
cursor flashes next to the
first letter of the currently selected row. This is not visually
appealing. I would like to
show the current row in reverse. How is this done?
4. If I have 2 networked systems, running I-Net, How can I copy rows from
one to the other.
FOREACH loses the cursor position. The only thing I've been able to do
is to unload a file,
rcp it to the other system and run an rcmd to load it to the correct
table. This method sucks.
is there a better way.
TIA,
John Cokos
-----------------End of Original Message-----------------