Forum Discussion

francisco1's avatar
francisco1
New Contributor
3 years ago

How to fetch the data from a textbox

I have a keyword test in a windows application and I need fetch data from a textbox   for example the last textbox.   I need safe value on a variable to use in sql query   how i can do th...
  • rraghvani's avatar
    3 years ago

    I'm not sure whether you are doing keyword testing or scripting, but once you've captured the value from your text box, store the value into a variable to be used afterwards.

     

    Construct your sql query string, for example var sqlStr = "select * from persons where id = 100", replace the value 100 with your variable. e.g. var sqlStr = "select * from persons where id = " + myvar. Which you can then use afterwards.

     

    There are examples on how to connect to a database, see Using ADO Components.