New Era 3.0 select stmt being weird
Posted in 1997
From an NE3.0 screen, I pass 2 variables (smallint and a char(4)) to a 4GL function in another module. The module does a select from a table where field1 = var1 and field2 = var2. Except it won't do it. It will select correctly if I omit the character part (just use field1 = var1), but if I try to select where field2 = var2 even by itself, it returns junk. I inserted a display statement to test the content of my variables before the select and they contain the correct data. I went into DBACCESS and did the select using the actual values and the data I am looking for is there. Now this same select worked in plain old 4GL (I am rewriting a 4GL prog in NE - sigh). Am I being dense here? variable x1 smallint variable x2 char(4) variable x3 char(10) select modeltype into x3 from carmodels where manunum=x1 WORKS FINE select modeltype into x3 from carmodels where modelcode =x2 BOMBS in the carmodel table, manunum is a smallint and modelcode is char(4) In my test case, both should return valid info and there are no dups or anything. Thoughts? Monica