Page 1 of 1
Inserting an MSSQL line in the DB
Posted: Sun Mar 16, 2014 6:24 pm
by icaronz
Hi,
I'm trying to insert/update a field in the DB (MSSQL) as part of my installation.
How can I accomplish this using installaware?
Best Regards,
Re: Inserting an MSSQL line in the DB
Posted: Mon Mar 17, 2014 12:10 pm
by FrancescoT
Dear User,
You can use the "MS SQL Server" plug-in in your project script.
In addition, I may suggest you to have a look at the included sample project; "MS SQL Server Connection".
Regards
Re: Inserting an MSSQL line in the DB
Posted: Mon Mar 17, 2014 4:41 pm
by icaronz
Hi FrancescoT,
Thanks for your help it worked great using the sample as a guide line, I still have just one problem and I really hope you can help me.
When I'm reading data from the DB how do I save it in a installaware variable?
eg. Select Product, Version from plMachine where MachineName = $ThisMachineName$
How do I add the values I got back from the select statement into the variables $ProductFound$= Product and $VersionFound$ = Version
Best Regards,
Re: Inserting an MSSQL line in the DB
Posted: Tue Mar 18, 2014 12:19 pm
by FrancescoT
Dear User,
the "MS SQL Server" plug-in doesn't return any value from the executed script operation.
I am not an MS SQL expert, but for what I know an MS SQL script can't return a value.
You should use a Stored Procedure instead.
Anyway, this have to be implemented developing a custom DLL or an EXE, that you could call from your setup script.
Then you can assign the value returned from the dll/exe to a script variable.
Hope this helps you.
Regards