Re: datatype for string
Posted in 2011
On 09/08/2011 15:26, Enrique Ferreyra wrote: > Great ! > > While LVARCHAR isnt supported in informix 4GL (you cant declare a > variable LVARCHAR) what i do is to make a PREPARE statement with > parameters and pass to the LVARCHAR column a regular CHAR variable, it > works and i check that used space is only the used chars, not trailing > white spaces! > > Thank you > > FUNCTION f_error_it_logging(pexc) > DEFINE pexc CHAR(500) > > ...... > > LET lsql = "INSERT INTO basurero:log(log_fec, log_usr, log_srv_usr,", > "log_srv_nam, log_lvl, log_nom, log_app, log_dir, log_msg,", > "log_exc) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" > > PREPARE l_ins FROM lsql > > EXECUTE l_ins USING llog_fec, g_usr, g_usr, llog_srv_nam, llog_lvl, > llog_nom, > g_prg, llog_dir, g_err_msg, pexc <<<---- LVARCHAR > IN DATABASE Glad that worked! :o) -- Cheers, Obnoxio The Clown http://obotheclown.blogspot.com I will now proceed to pleasure myself with this fish.