PDA

View Full Version : Run Sql Action, how to get a value from SQL?


maorlast2
01-09-2011, 09:38 AM
I am using Visual Build 7.7

I am trying to get a specific value from the database table
I am using “Run Sql” Action and using SELECT query

how can i set the value that i got from the db into a temp marco?
I also tried to take it from LASTSTEP_OUTPUT but i see this result:

“MyValue

(1 row affected)”

I would like to remove the “(1 row affected)” and get the exact value "MyValue"

How can I do that?

kinook
01-10-2011, 11:39 AM
See attached sample.

maorlast2
01-10-2011, 05:10 PM
Thank you for your assistance.

I have another question that is also related to the same subject

For querying the database, i am using the ADO component and it does the work very well.

My question is can i do a SELECT query that will return several rows and iterate every value in every single row and save their values into Macro's?

I was able to do that when the SELECT returned me 1 row, can i do it with more than one row?

Thanks

kinook
01-10-2011, 06:42 PM
Yes, use the Loop action (see the Server.bld sample).
http://www.kinook.com/VisBuildPro/Manual/serversample.htm
http://www.kinook.com/VisBuildPro/Manual/loopaction.htm