Re: [WiX-users] C# Custom Actions / SQL

2014-01-24 Thread Levi Wilson
Sorry, one caveat to that post is that we will NOT be creating the actual
database. It will be empty, and the client sets up the permissions
beforehand.


On Fri, Jan 24, 2014 at 10:42 AM, Levi Wilson  wrote:

> I'm fine with using that to do both the schema and initial data deploy
> with the one method. What I'm unclear/fuzzy are the incremental
> changes/migrations that we do from release to release. Originally, this was
> my plan:
>
>
> http://nicholas.piasecki.name/blog/2009/09/running-update-sql-scripts-during-minor-upgrades-with-wix/
>
> I still like the idea of that as it seems easier for me to grok.
>
> Thank you so much for your thoughts; you clearly have done this before ;-)
>
>
> On Fri, Jan 24, 2014 at 9:57 AM, John Cooper wrote:
>
>> There are disadvantages to using this mixed approach.  Chief among them
>> is that you inherit SqlScript/SqlString's limitations on default instances
>> if SQL browsing is disabled.  I've tested and SqlPackage does not have this
>> limitation.  That being said, we do have a mix (particularly to implement
>> ALTER RECOVERY SIMPLE), but we're always moving to merge them back into the
>> main package.
>>
>> Whenever possible, I recommend doing both the schema and data deploy with
>> one method.  If you're going to use SqlPackage to deploy the schema, it's
>> not that much harder to have it deploy the default data too.  In fact, the
>> schema code runs for us only if:  1) the database doesn't exist; or 2) the
>> schema has changed and can be safely updated.  The default data runs only
>> if the data is missing or the scripts decide it is corrupt.  We also hae a
>> bunch of scripts run during the package deploy to set roles, logins,  and
>> grant permissions.
>>
>> In fact, a lot of these scripts are common to are databases and are
>> shared among.
>>
>> --
>> John Merryweather Cooper
>> Build & Install Engineer - ESA
>> Jack Henry & Associates, Inc.®
>> Shawnee Mission, KS  66227
>> Office:  913-341-3434 x791011
>> jocoo...@jackhenry.com
>> www.jackhenry.com
>>
>>
>>
>>
>> -Original Message-
>> From: Levi Wilson [mailto:l...@leviwilson.com]
>> Sent: Friday, January 24, 2014 8:40 AM
>> To: General discussion about the WiX toolset.
>> Subject: Re: [WiX-users] C# Custom Actions / SQL
>>
>> Thanks! I was planning on only using it to do my initial schema setup,
>> and have SqlScript do everything else. My current RedGate schema export is
>> 144k and it takes 6 minutes for the C++ CA to parse it :( Just trying to
>> figure out my options.
>>
>>
>> On Fri, Jan 24, 2014 at 9:33 AM, John Cooper 
>> wrote:
>>
>> > Well, I'll see if I can throw something together.  I can't expose the
>> > code, but I can describe the component custom actions and the table in
>> > enough detail to make it easy enough to re-implement.
>> >
>> > The one big gotcha is early releases of the SSDT had versions of
>> > SqlPackage.exe that lacked a provision to extend the timeout.  This
>> > doesn't matter much on a remote deploy if you're only deploying one
>> > database, but if you're deploying several, you'll need to extend the
>> > timeout by setting a registry entry.  We generally set it a 5 minutes
>> > (300 seconds) which may be overkill, but works for us.  I recommend
>> > only use the October 2013 (or
>> > later) SSDT package.
>> >
>> > My technique deploys up to seven databases in this manner.  I'm using
>> > it in production on eight products currently (and converting an
>> > additional product over to it that currently uses SqlScript/SqlString).
>> >
>> > I'll try to have something up on my blog by Monday.
>> >
>> > --
>> > John Merryweather Cooper
>> > Build & Install Engineer - ESA
>> > Jack Henry & Associates, Inc.®
>> > Shawnee Mission, KS  66227
>> > Office:  913-341-3434 x791011
>> > jocoo...@jackhenry.com
>> > www.jackhenry.com
>> >
>> >
>> >
>> > -Original Message-
>> > From: Levi Wilson [mailto:l...@leviwilson.com]
>> > Sent: Friday, January 24, 2014 8:21 AM
>> > To: General discussion about the WiX toolset.
>> > Subject: Re: [WiX-users] C# Custom Actions / SQL
>> >
>> > Thanks for the responses guys, that helps a lot.
>> >
>> > John: do you have any blog posts or anything that speaks to ho

Re: [WiX-users] C# Custom Actions / SQL

2014-01-24 Thread Levi Wilson
I'm fine with using that to do both the schema and initial data deploy with
the one method. What I'm unclear/fuzzy are the incremental
changes/migrations that we do from release to release. Originally, this was
my plan:

http://nicholas.piasecki.name/blog/2009/09/running-update-sql-scripts-during-minor-upgrades-with-wix/

I still like the idea of that as it seems easier for me to grok.

Thank you so much for your thoughts; you clearly have done this before ;-)


On Fri, Jan 24, 2014 at 9:57 AM, John Cooper  wrote:

> There are disadvantages to using this mixed approach.  Chief among them is
> that you inherit SqlScript/SqlString's limitations on default instances if
> SQL browsing is disabled.  I've tested and SqlPackage does not have this
> limitation.  That being said, we do have a mix (particularly to implement
> ALTER RECOVERY SIMPLE), but we're always moving to merge them back into the
> main package.
>
> Whenever possible, I recommend doing both the schema and data deploy with
> one method.  If you're going to use SqlPackage to deploy the schema, it's
> not that much harder to have it deploy the default data too.  In fact, the
> schema code runs for us only if:  1) the database doesn't exist; or 2) the
> schema has changed and can be safely updated.  The default data runs only
> if the data is missing or the scripts decide it is corrupt.  We also hae a
> bunch of scripts run during the package deploy to set roles, logins,  and
> grant permissions.
>
> In fact, a lot of these scripts are common to are databases and are shared
> among.
>
> --
> John Merryweather Cooper
> Build & Install Engineer - ESA
> Jack Henry & Associates, Inc.®
> Shawnee Mission, KS  66227
> Office:  913-341-3434 x791011
> jocoo...@jackhenry.com
> www.jackhenry.com
>
>
>
>
> -Original Message-
> From: Levi Wilson [mailto:l...@leviwilson.com]
> Sent: Friday, January 24, 2014 8:40 AM
> To: General discussion about the WiX toolset.
> Subject: Re: [WiX-users] C# Custom Actions / SQL
>
> Thanks! I was planning on only using it to do my initial schema setup, and
> have SqlScript do everything else. My current RedGate schema export is 144k
> and it takes 6 minutes for the C++ CA to parse it :( Just trying to figure
> out my options.
>
>
> On Fri, Jan 24, 2014 at 9:33 AM, John Cooper 
> wrote:
>
> > Well, I'll see if I can throw something together.  I can't expose the
> > code, but I can describe the component custom actions and the table in
> > enough detail to make it easy enough to re-implement.
> >
> > The one big gotcha is early releases of the SSDT had versions of
> > SqlPackage.exe that lacked a provision to extend the timeout.  This
> > doesn't matter much on a remote deploy if you're only deploying one
> > database, but if you're deploying several, you'll need to extend the
> > timeout by setting a registry entry.  We generally set it a 5 minutes
> > (300 seconds) which may be overkill, but works for us.  I recommend
> > only use the October 2013 (or
> > later) SSDT package.
> >
> > My technique deploys up to seven databases in this manner.  I'm using
> > it in production on eight products currently (and converting an
> > additional product over to it that currently uses SqlScript/SqlString).
> >
> > I'll try to have something up on my blog by Monday.
> >
> > --
> > John Merryweather Cooper
> > Build & Install Engineer - ESA
> > Jack Henry & Associates, Inc.®
> > Shawnee Mission, KS  66227
> > Office:  913-341-3434 x791011
> > jocoo...@jackhenry.com
> > www.jackhenry.com
> >
> >
> >
> > -Original Message-
> > From: Levi Wilson [mailto:l...@leviwilson.com]
> > Sent: Friday, January 24, 2014 8:21 AM
> > To: General discussion about the WiX toolset.
> > Subject: Re: [WiX-users] C# Custom Actions / SQL
> >
> > Thanks for the responses guys, that helps a lot.
> >
> > John: do you have any blog posts or anything that speaks to how you're
> > deploying databases and such with WiX with SqlPackage.exe? My other
> > post talks about some of the pain I'm having with a very large SQL
> > script (144k
> > lines) and wondering if SqlPackage.exe would alleviate some of that.
> >
> > Thanks,
> >
> > Levi
> >
> >
> > On Fri, Jan 24, 2014 at 12:53 AM, Blair Murri  wrote:
> >
> > > If they are not in DTF then the WiX toolset doesn't provide them.
> > > It's assumed that most of what drove you to managed code would
> > > already be in the Framework so th

Re: [WiX-users] C# Custom Actions / SQL

2014-01-24 Thread John Cooper
There are disadvantages to using this mixed approach.  Chief among them is that 
you inherit SqlScript/SqlString's limitations on default instances if SQL 
browsing is disabled.  I've tested and SqlPackage does not have this 
limitation.  That being said, we do have a mix (particularly to implement ALTER 
RECOVERY SIMPLE), but we're always moving to merge them back into the main 
package.

Whenever possible, I recommend doing both the schema and data deploy with one 
method.  If you're going to use SqlPackage to deploy the schema, it's not that 
much harder to have it deploy the default data too.  In fact, the schema code 
runs for us only if:  1) the database doesn't exist; or 2) the schema has 
changed and can be safely updated.  The default data runs only if the data is 
missing or the scripts decide it is corrupt.  We also hae a bunch of scripts 
run during the package deploy to set roles, logins,  and grant permissions.

In fact, a lot of these scripts are common to are databases and are shared 
among.

--
John Merryweather Cooper
Build & Install Engineer - ESA
Jack Henry & Associates, Inc.®
Shawnee Mission, KS  66227
Office:  913-341-3434 x791011
jocoo...@jackhenry.com
www.jackhenry.com




-Original Message-
From: Levi Wilson [mailto:l...@leviwilson.com] 
Sent: Friday, January 24, 2014 8:40 AM
To: General discussion about the WiX toolset.
Subject: Re: [WiX-users] C# Custom Actions / SQL

Thanks! I was planning on only using it to do my initial schema setup, and have 
SqlScript do everything else. My current RedGate schema export is 144k and it 
takes 6 minutes for the C++ CA to parse it :( Just trying to figure out my 
options.


On Fri, Jan 24, 2014 at 9:33 AM, John Cooper  wrote:

> Well, I'll see if I can throw something together.  I can't expose the 
> code, but I can describe the component custom actions and the table in 
> enough detail to make it easy enough to re-implement.
>
> The one big gotcha is early releases of the SSDT had versions of 
> SqlPackage.exe that lacked a provision to extend the timeout.  This 
> doesn't matter much on a remote deploy if you're only deploying one 
> database, but if you're deploying several, you'll need to extend the 
> timeout by setting a registry entry.  We generally set it a 5 minutes 
> (300 seconds) which may be overkill, but works for us.  I recommend 
> only use the October 2013 (or
> later) SSDT package.
>
> My technique deploys up to seven databases in this manner.  I'm using 
> it in production on eight products currently (and converting an 
> additional product over to it that currently uses SqlScript/SqlString).
>
> I'll try to have something up on my blog by Monday.
>
> --
> John Merryweather Cooper
> Build & Install Engineer - ESA
> Jack Henry & Associates, Inc.®
> Shawnee Mission, KS  66227
> Office:  913-341-3434 x791011
> jocoo...@jackhenry.com
> www.jackhenry.com
>
>
>
> -----Original Message-----
> From: Levi Wilson [mailto:l...@leviwilson.com]
> Sent: Friday, January 24, 2014 8:21 AM
> To: General discussion about the WiX toolset.
> Subject: Re: [WiX-users] C# Custom Actions / SQL
>
> Thanks for the responses guys, that helps a lot.
>
> John: do you have any blog posts or anything that speaks to how you're 
> deploying databases and such with WiX with SqlPackage.exe? My other 
> post talks about some of the pain I'm having with a very large SQL 
> script (144k
> lines) and wondering if SqlPackage.exe would alleviate some of that.
>
> Thanks,
>
> Levi
>
>
> On Fri, Jan 24, 2014 at 12:53 AM, Blair Murri  wrote:
>
> > If they are not in DTF then the WiX toolset doesn't provide them. 
> > It's assumed that most of what drove you to managed code would 
> > already be in the Framework so there isn't the same level of need to 
> > invent the
> wheel.
> >
> >
> > Having said that, I like John's reply. Cool system. I'll have to 
> > remember that next time I'm faced with installers populating databases.
> >
> >
> >
> >
> >
> >
> > Blair
> >
> >
> >
> >
> >
> > From: Levi Wilson
> > Sent: Thursday, January 23, 2014 6:37 AM
> > To: General discussion for Windows Installer XML toolset.
> >
> >
> >
> >
> >
> > Being out of the WiX installer world for a handful of years, I was 
> > used to writing all of my custom actions in C++. Getting back into 
> > this I noticed that it is now acceptable to write them in C# and the DTF.
> >
> > That being said, I have a custom action that is currently written in
> > C++ that checks for the existence of a database 

Re: [WiX-users] C# Custom Actions / SQL

2014-01-24 Thread Levi Wilson
Thanks! I was planning on only using it to do my initial schema setup, and
have SqlScript do everything else. My current RedGate schema export is 144k
and it takes 6 minutes for the C++ CA to parse it :( Just trying to figure
out my options.


On Fri, Jan 24, 2014 at 9:33 AM, John Cooper  wrote:

> Well, I'll see if I can throw something together.  I can't expose the
> code, but I can describe the component custom actions and the table in
> enough detail to make it easy enough to re-implement.
>
> The one big gotcha is early releases of the SSDT had versions of
> SqlPackage.exe that lacked a provision to extend the timeout.  This doesn't
> matter much on a remote deploy if you're only deploying one database, but
> if you're deploying several, you'll need to extend the timeout by setting a
> registry entry.  We generally set it a 5 minutes (300 seconds) which may be
> overkill, but works for us.  I recommend only use the October 2013 (or
> later) SSDT package.
>
> My technique deploys up to seven databases in this manner.  I'm using it
> in production on eight products currently (and converting an additional
> product over to it that currently uses SqlScript/SqlString).
>
> I'll try to have something up on my blog by Monday.
>
> --
> John Merryweather Cooper
> Build & Install Engineer - ESA
> Jack Henry & Associates, Inc.®
> Shawnee Mission, KS  66227
> Office:  913-341-3434 x791011
> jocoo...@jackhenry.com
> www.jackhenry.com
>
>
>
> -Original Message-
> From: Levi Wilson [mailto:l...@leviwilson.com]
> Sent: Friday, January 24, 2014 8:21 AM
> To: General discussion about the WiX toolset.
> Subject: Re: [WiX-users] C# Custom Actions / SQL
>
> Thanks for the responses guys, that helps a lot.
>
> John: do you have any blog posts or anything that speaks to how you're
> deploying databases and such with WiX with SqlPackage.exe? My other post
> talks about some of the pain I'm having with a very large SQL script (144k
> lines) and wondering if SqlPackage.exe would alleviate some of that.
>
> Thanks,
>
> Levi
>
>
> On Fri, Jan 24, 2014 at 12:53 AM, Blair Murri  wrote:
>
> > If they are not in DTF then the WiX toolset doesn't provide them. It's
> > assumed that most of what drove you to managed code would already be
> > in the Framework so there isn't the same level of need to invent the
> wheel.
> >
> >
> > Having said that, I like John's reply. Cool system. I'll have to
> > remember that next time I'm faced with installers populating databases.
> >
> >
> >
> >
> >
> >
> > Blair
> >
> >
> >
> >
> >
> > From: Levi Wilson
> > Sent: Thursday, January 23, 2014 6:37 AM
> > To: General discussion for Windows Installer XML toolset.
> >
> >
> >
> >
> >
> > Being out of the WiX installer world for a handful of years, I was
> > used to writing all of my custom actions in C++. Getting back into
> > this I noticed that it is now acceptable to write them in C# and the DTF.
> >
> > That being said, I have a custom action that is currently written in
> > C++ that checks for the existence of a database as well as to verify
> > if a particular table exists. For that, I am using the sqlutil.lib to
> > make that easier. In C# custom actions, is there an equivalent or do
> > most people just use SqlConnection / SqlCommand out of the .NET
> framework?
> >
> > Apologies if this is an obvious question, I just didn't want to
> > re-invent the wheel if WiX had a helper library to assist with this. I
> > didn't see any SQL related classes in DTF.
> >
> > Thanks in advance,
> >
> > Levi
> >
> > --
> >  CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> > Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical
> > Workloads, Development Environments & Everything In Between.
> > Get a Quote or Start a Free Trial Today.
> >
> > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.
> > clktrk ___
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
> > --
> >  CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> > Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical
> > Workloads, Deve

Re: [WiX-users] C# Custom Actions / SQL

2014-01-24 Thread John Cooper
Well, I'll see if I can throw something together.  I can't expose the code, but 
I can describe the component custom actions and the table in enough detail to 
make it easy enough to re-implement.

The one big gotcha is early releases of the SSDT had versions of SqlPackage.exe 
that lacked a provision to extend the timeout.  This doesn't matter much on a 
remote deploy if you're only deploying one database, but if you're deploying 
several, you'll need to extend the timeout by setting a registry entry.  We 
generally set it a 5 minutes (300 seconds) which may be overkill, but works for 
us.  I recommend only use the October 2013 (or later) SSDT package.

My technique deploys up to seven databases in this manner.  I'm using it in 
production on eight products currently (and converting an additional product 
over to it that currently uses SqlScript/SqlString).

I'll try to have something up on my blog by Monday.

--
John Merryweather Cooper
Build & Install Engineer - ESA
Jack Henry & Associates, Inc.®
Shawnee Mission, KS  66227
Office:  913-341-3434 x791011
jocoo...@jackhenry.com
www.jackhenry.com



-Original Message-
From: Levi Wilson [mailto:l...@leviwilson.com] 
Sent: Friday, January 24, 2014 8:21 AM
To: General discussion about the WiX toolset.
Subject: Re: [WiX-users] C# Custom Actions / SQL

Thanks for the responses guys, that helps a lot.

John: do you have any blog posts or anything that speaks to how you're 
deploying databases and such with WiX with SqlPackage.exe? My other post talks 
about some of the pain I'm having with a very large SQL script (144k
lines) and wondering if SqlPackage.exe would alleviate some of that.

Thanks,

Levi


On Fri, Jan 24, 2014 at 12:53 AM, Blair Murri  wrote:

> If they are not in DTF then the WiX toolset doesn't provide them. It's 
> assumed that most of what drove you to managed code would already be 
> in the Framework so there isn't the same level of need to invent the wheel.
>
>
> Having said that, I like John's reply. Cool system. I'll have to 
> remember that next time I'm faced with installers populating databases.
>
>
>
>
>
>
> Blair
>
>
>
>
>
> From: Levi Wilson
> Sent: Thursday, January 23, 2014 6:37 AM
> To: General discussion for Windows Installer XML toolset.
>
>
>
>
>
> Being out of the WiX installer world for a handful of years, I was 
> used to writing all of my custom actions in C++. Getting back into 
> this I noticed that it is now acceptable to write them in C# and the DTF.
>
> That being said, I have a custom action that is currently written in 
> C++ that checks for the existence of a database as well as to verify 
> if a particular table exists. For that, I am using the sqlutil.lib to 
> make that easier. In C# custom actions, is there an equivalent or do 
> most people just use SqlConnection / SqlCommand out of the .NET framework?
>
> Apologies if this is an obvious question, I just didn't want to 
> re-invent the wheel if WiX had a helper library to assist with this. I 
> didn't see any SQL related classes in DTF.
>
> Thanks in advance,
>
> Levi
>
> --
>  CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical 
> Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.
> clktrk ___
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
> --
>  CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical 
> Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.
> clktrk ___
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical 
Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
WiX-user

Re: [WiX-users] C# Custom Actions / SQL

2014-01-24 Thread Levi Wilson
Thanks for the responses guys, that helps a lot.

John: do you have any blog posts or anything that speaks to how you're
deploying databases and such with WiX with SqlPackage.exe? My other post
talks about some of the pain I'm having with a very large SQL script (144k
lines) and wondering if SqlPackage.exe would alleviate some of that.

Thanks,

Levi


On Fri, Jan 24, 2014 at 12:53 AM, Blair Murri  wrote:

> If they are not in DTF then the WiX toolset doesn’t provide them. It’s
> assumed that most of what drove you to managed code would already be in the
> Framework so there isn’t the same level of need to invent the wheel.
>
>
> Having said that, I like John’s reply. Cool system. I’ll have to remember
> that next time I’m faced with installers populating databases.
>
>
>
>
>
>
> Blair
>
>
>
>
>
> From: Levi Wilson
> Sent: Thursday, January 23, 2014 6:37 AM
> To: General discussion for Windows Installer XML toolset.
>
>
>
>
>
> Being out of the WiX installer world for a handful of years, I was used to
> writing all of my custom actions in C++. Getting back into this I noticed
> that it is now acceptable to write them in C# and the DTF.
>
> That being said, I have a custom action that is currently written in C++
> that checks for the existence of a database as well as to verify if a
> particular table exists. For that, I am using the sqlutil.lib to make that
> easier. In C# custom actions, is there an equivalent or do most people just
> use SqlConnection / SqlCommand out of the .NET framework?
>
> Apologies if this is an obvious question, I just didn't want to re-invent
> the wheel if WiX had a helper library to assist with this. I didn't see any
> SQL related classes in DTF.
>
> Thanks in advance,
>
> Levi
>
> --
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> ___
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
> --
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> ___
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] C# Custom Actions / SQL

2014-01-23 Thread Blair Murri
If they are not in DTF then the WiX toolset doesn’t provide them. It’s assumed 
that most of what drove you to managed code would already be in the Framework 
so there isn’t the same level of need to invent the wheel.


Having said that, I like John’s reply. Cool system. I’ll have to remember that 
next time I’m faced with installers populating databases.






Blair





From: Levi Wilson
Sent: ‎Thursday‎, ‎January‎ ‎23‎, ‎2014 ‎6‎:‎37‎ ‎AM
To: General discussion for Windows Installer XML toolset.





Being out of the WiX installer world for a handful of years, I was used to
writing all of my custom actions in C++. Getting back into this I noticed
that it is now acceptable to write them in C# and the DTF.

That being said, I have a custom action that is currently written in C++
that checks for the existence of a database as well as to verify if a
particular table exists. For that, I am using the sqlutil.lib to make that
easier. In C# custom actions, is there an equivalent or do most people just
use SqlConnection / SqlCommand out of the .NET framework?

Apologies if this is an obvious question, I just didn't want to re-invent
the wheel if WiX had a helper library to assist with this. I didn't see any
SQL related classes in DTF.

Thanks in advance,

Levi
--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] C# Custom Actions / SQL

2014-01-23 Thread John Cooper
The .NET Framework API's are entirely satisfactory except in terms of error 
returns.  We don't check for he existenece of a database in the custom action 
code as we deploy to cloaked SQL servers (browsing disabled, servers operating 
on non-standard, high number ports, no DNS to remote SQL server assumed, etc.)  
We allow the SQL script to do the detection and handle the case where the 
database already exists or needs repair.  SqlPackage.exe is used for the actual 
deployment, although .NET framework calls are used to construct and validate 
the connection string.  A master table-driven custom action is then used to 
deploy one or more databases to one or more instances/connection strings in one 
pass.

--
John Merryweather Cooper
Build & Install Engineer - ESA
Jack Henry & Associates, Inc.®
Shawnee Mission, KS  66227
Office:  913-341-3434 x791011
jocoo...@jackhenry.com
www.jackhenry.com



-Original Message-
From: Levi Wilson [mailto:l...@leviwilson.com] 
Sent: Thursday, January 23, 2014 8:33 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] C# Custom Actions / SQL

Being out of the WiX installer world for a handful of years, I was used to 
writing all of my custom actions in C++. Getting back into this I noticed that 
it is now acceptable to write them in C# and the DTF.

That being said, I have a custom action that is currently written in C++ that 
checks for the existence of a database as well as to verify if a particular 
table exists. For that, I am using the sqlutil.lib to make that easier. In C# 
custom actions, is there an equivalent or do most people just use SqlConnection 
/ SqlCommand out of the .NET framework?

Apologies if this is an obvious question, I just didn't want to re-invent the 
wheel if WiX had a helper library to assist with this. I didn't see any SQL 
related classes in DTF.

Thanks in advance,

Levi
--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical 
Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
NOTICE: This electronic mail message and any files transmitted with it are 
intended
exclusively for the individual or entity to which it is addressed. The message, 
together with any attachment, may contain confidential and/or privileged 
information.
Any unauthorized review, use, printing, saving, copying, disclosure or 
distribution 
is strictly prohibited. If you have received this message in error, please 
immediately advise the sender by reply email and delete all copies.


--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users