Re: FourGen Forms and text column
Posted in 1995
Yep, you are correct. These are all fixed in 4.12. You can get around many of the problems if the LAST column in your table is not a text/varchar/blob. That is the reason that it loses it mind most of the time. ---- original message from Vadim G. Park ---- ++ ++ I use I-4GL Forms v.4.10 UC1 (OnLine v.5.0, Interactive Unix v.3.2) ++ ++ First problem. The Code Generator generates wrong q_ record in globals.4gl ++ if a table has text column. ++ ++ ------- generated globals.4gl -------- ++ ... ++ q_moblob record # Parallel demoblb record ++ row_id integer # SQL rowid <----- A COMMA MISSED ! ++ f_txt char(60) # Temp filename for txt ++ #_define_1 ++ #_end ++ end record, ++ ... ++ ++ First time when i add or delete any trigger corresponding to q_ record ++ (e.g. define for input1) q_ record is generated without the mistake. ++ ++ Second problem. If a text column is last on a form then fg.screen generates ++ wrong SELECT for all PREPARE in llh_read() as well. ++ ++ ------- generated header.4gl ---------- ++ ... ++ # one of the bad SELECTs ++ #_select - select statement ++ let scratch = "select ", ++ "keys,", ++ "fld,", <- THE COMMA IS SUPERFLUOUS ! ++ " from demoblob where rowid = ?" ++ ++ #_prep_curs - Prepare the SQL string for execution ++ prepare read_specs from scratch <- A COMPILATION FAILED HERE ++ declare h_cursor cursor for read_specs ++ ... ++ ++ ++ Below i attached demoblb.sql and demoblb.per to demonstrate the first problem. ++ You can easy change the .per to look at the second problem. ++ ++ Thanks in advance, ++ Vadim G. Park Tax Police Territorial Department, Krasnoyarsk, Russia ++ Fax: (391-2) 27-07-69, Voice: 27-02-83 E-mail: pivot@taxpol.krasnoyarsk.su ++ ++ -------- demoblb.sql --------- ++ create table demoblob ++ ( ++ keys char(10), ++ fld char(10), ++ txt text ++ ) ++ --------- demoblb.per --------- Do not forget to change database, please ++ {##################################################################### ++ # Copyright (C) 1992 Informix Software, Inc. ++ # Copyright (C) 1992 FourGen Software, Inc. ++ # Sccsid: @(#) .../screen.4gm/painter.4gs/cgs_init.4gl 1.32 Delta: ++ ###################################################################### ++ # Screen Generator version: 4.10.UC1 } ++ ++ ++ DATABASE tax ++ ++ SCREEN ++ { ++ ----------------------------- demoblob table ------------------------------- ++ ++ keys:[A1 ] text: [A] ++ fld :[A2 ] ++ } ++ ++ TABLES ++ demoblob ++ ++ ATTRIBUTES ++ A1 = demoblob.keys, comments = ""; ++ A = demoblob.txt, comments = ""; ++ A2 = demoblob.fld, comments = ""; ++ ++ INSTRUCTIONS ++ screen record s_demoblb (demoblob.keys, demoblob.txt, demoblob.fld) ++ ++ delimiters " " ++ ++ { ++ ###################################################################### ++ FOURGEN ++ ###################################################################### ++ ++ defaults ++ module = test ++ type = header ++ init = 1=0 ++ attributes = border, white ++ location = 2, 3 ++ ++ input 1 ++ table = demoblob ++ filter = 1=1 ++ blobdef = txt, vi, Y ++ } ++ ++ ++ ++ ++ -- Jerry M. Denman -- Director of Special Projects Sherwood Systems (a division of Sherwood Mfg Co. Inc.) jerry@sherwood.com ------------------------------------------------------------------------------ The manner in which one endures what must be endured is more important than the thing that must be endured. - DEAN ACHESON