[wix-users] Execute BCP command for importing SQL data

Ronny Eriksson ronny.eriksson at optimity.se
Wed Apr 4 10:49:57 PDT 2018


Hi

You have do to that from a CA, with like something like Process.Start() to run BCP.exe to import file.
On this site you can find all parameter used to run the BCP program though like cmd.
https://docs.microsoft.com/en-us/sql/tools/bcp-utility
I use BCP in my installer to create a database and import data, but I have made a dll that does all the BCP work so I just call the object from the dll in a CA in the installer, but it should very possible to do it straight from a CA.

But remember that you need  SSMS installed for BCP to work or you need a lot of dlls to get it to work.
You can't just BCP.exe stand alone on any server/computer.

Best Regards
Ronny Eriksson 

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Ven H via wix-users
Sent: Wednesday, 4 April 2018 09:34
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Ven H <venh.123 at gmail.com>
Subject: [wix-users] Execute BCP command for importing SQL data

I have a requirement to import SQL data into a table using BCP (Bulk Copy Program). I have been given a .bin file with the data which needs to be imported into a table. Is this possible to achieve it in a simple way like calling .sql script file with SqlScript element? I am not even sure, how to invoke it from a custom action also. Any help would be really appreciated.

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list