Inserting an MSSQL line in the DB

Got a problem you cannot solve? Try here.
icaronz
Posts: 19
Joined: Thu Oct 24, 2013 2:07 pm

Inserting an MSSQL line in the DB

Postby icaronz » Sun Mar 16, 2014 6:24 pm

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,

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Inserting an MSSQL line in the DB

Postby FrancescoT » Mon Mar 17, 2014 12:10 pm

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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

icaronz
Posts: 19
Joined: Thu Oct 24, 2013 2:07 pm

Re: Inserting an MSSQL line in the DB

Postby icaronz » Mon Mar 17, 2014 4:41 pm

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,

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Inserting an MSSQL line in the DB

Postby FrancescoT » Tue Mar 18, 2014 12:19 pm

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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 87 guests