SQL Query Text 
Author Message
 SQL Query Text

Hi, Jimmy.

Try this:

procedure GetQueryString(aQuery :TQuery; aList :TStrings);
  FindPos   :LongInt;
  LenParam  :LongInt;
  LoopParam :LongInt;
  LoopLine  :LongInt;
  StrParam  :String;
  StrLine   :String;
  ValParam  :String;
  if (aQuery.Params.Count <> 0) then
       for LoopParam:= 0 to (aQuery.Params.Count- 1) do
           StrParam:= ':'+ aQuery.Params.Items[LoopParam].Name;
           ValParam:= aQuery.Params.Items[LoopParam].AsString;
           LenParam:= Length(StrParam);

           for LoopLine:= 0 to (aList.Count- 1) do
               StrLine:= aList.Strings[LoopLine];

                 FindPos:= Pos(StrParam, StrLine);

                 if (FindPos <> 0) then
                   StrLine:= copy(StrLine, 1, (FindPos- 1))+ ValParam+
copy(StrLine, (FindPos+ LenParam), 255);

               until (FindPos = 0);
               aList.Strings[LoopLine]:= StrLine;

Petio Tonev

www.i.am/ptonev , www.w3.to/tonevsoft

Wed, 18 Jun 1902 08:00:00 GMT
 [ 1 post ] 

 Relevant Pages 

1. Find SQL query text on Sybase 11 ?

2. Obtaining SQL Query Text via SPID

3. SQL Query problem concat text field from mulitple rows into one text field

4. Replacing text in query output (from a text-column)

5. Delay in Executing a Query in Query Analyzer with option Results in Text

6. SQL 7 Full Text Query Setup; Html Filtering

7. text field queries slower on SQL 7

8. SQL ASP Query support for 2 Languages using Full Text Search

9. Problems querying SQL 7.0 Linked Server using ODBC Text Driver

10. Full text or standard sql query?

11. SQL Query -> Multiple Text Files

12. Text Query Slower on SQL 7, Why?

Powered by phpBB® Forum Software