cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not applicable

Retrieve value of some sql query in InsallShield 2009 in some variable

I want to run the following query to find version of MySQL
SELECT @@VERSION;
GO

This displays the version of MySQL when running from MySQL command prompt.
I am able to run sql scripts from InstallShield 2009.
This script is also running successfully but I need to capture its return value in some variable in the script. Please suggest some way to do it. Thanks
Labels (1)
0 Kudos
(1) Reply
timstspry
Level 7

ajohri wrote:
I want to run the following query to find version of MySQL
SELECT @@VERSION;
GO

This displays the version of MySQL when running from MySQL command prompt.
I am able to run sql scripts from InstallShield 2009.
This script is also running successfully but I need to capture its return value in some variable in the script. Please suggest some way to do it. Thanks

You would think that this would be easy to do. However, I have asked for the same functionality as it does not exist in IS2009. Maybe it will in IS2010! About the only way I can think to do this would be to write a Managed Code assembly and execute it as a Custom Action. In the Managed Code assembly, you would have to do all the grunt work of connecting to the SQL Server, executing the query, and getting the result value into a variable that could be passed back to InstallShield.

Sorry, I know this is a lot of work but as I previously stated, this functionality does not exist in the current release of InstallShield.

Tim
0 Kudos