Re: 4GL Query By Example and ANSI Databases
Posted in 1993
In article <24ua4aINNd7@emory.mathcs.emory.edu> lester@access.digex.net (Lester Knutsen) writes: > >Joe, > >> LET q_txt = "SELECT ROWID FROM ""swkit"".requests WHERE ", q_txt CLIPPED > >Try excaping the quotes around "swkit" as in: > >LET q_txt = "SELECT ROWID FROM \\"swkit\\".requests WHERE ", q_txt CLIPPED I had this same problem some time ago in an older version of 4GL (don't remember which one). The solution I came up with was to use a separate global char(1) variable for the quote mark, and initialize it with something like "LET quote_mark = ASCII 34". Since we don't have that many instances of internal quotes, it wasn't too much of a pain to build those strings using concatenation. I don't recall whether I tried '\\"' as an alternative. I assume I did, since I came to 4GL out of somewhat of a C background. I mention the above because it may make a difference whether you're using c4gl or RDS. If Lester is using c4gl, AND c4gl is ignorantly passing the C-ism '\\"' through to cc, AND Joe has RDS, then he *may* still have problems. I did a Q&D test program using I4GL 4.10.UC2. Lo and behold, c4gl translated the sub-string '""' to '\\"'. Interesting. Anyway, all three methods worked for me using c4gl: '""', "\\"', and the separate variable. So, if the back-slash turns out not to work either, try a separate char(1) variable. It's kind of clunky, but reasonably sure to work. Good luck, Walt. -- Walt Hultgren Internet: walt@rmy.emory.edu (IP 128.140.8.1) Emory University UUCP: {...,gatech,rutgers,uunet}!emory!rmy!walt 954 Gatewood Road, NE BITNET: walt@EMORY Atlanta, GA 30329 USA Voice: +1 404 727 0648