Forum Discussion

Ravik's avatar
Ravik
Super Contributor
12 years ago

How to pass run time value in TestComplete 8

Hi All, I want to pass a random number in SQL Query, like a = 100  - (100 will be change at run time) I have write quary like below set RS = Conn.Execute("SELECT  * FROM   Table N...
  • Andrey_M's avatar
    12 years ago
    Hi Ravi.



    Seems like your string(s) should look like



    a=100



    set RS = Conn.Execute("SELECT  * FROM   Table Name where  FielsName =" & a & " ORDER BY 1 desc")

    or more neatly (implementing explicit type conversion)


    set RS = Conn.Execute("SELECT  * FROM   Table Name where  FielsName =" & CStr(a) & " ORDER BY 1 desc")