Forum > Databases

[CLOSED] ZEOS Change query text at runtime

(1/3) > >>

pcurtis:
How can I change query text at run time of design time created objects. With run time created objects I do this


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  MyQuery := TZQuery.Create(Self);   sSQL := ' SELECT ...';   MyQuery.SQL.Clear;  MyQuery.SQL.Add(sSQL); 
but with the design time object it does not work.

zeljko:
sSQL := 'SELECT ....';
MyDesignSQL.Clear;
MyDesignSQL.Add(sSQL);

pcurtis:
Read the question. It doesn't work.

dseligo:
What do you mean it doesn't work? Do you have an error?

What does ShowMessage(MyDesignSQL.SQL.Text); show?

pcurtis:
Nothing, just empty. No errors, just the string is never changed.

Navigation

[0] Message Index

[#] Next page

Go to full version