The last written bcp import was performed remotely in a SQL server environment. Because the project requires me to modify the Import and Export Process for large databases, the customer requires that the environment be a combination of web server, file server, and database server. SQL Server cannot be installed on the web server, and a large number
The last written bcp import was performed remotely in a SQL server environment. Because the project requires me to modify the Import and Export Process for large databases, the customer requires that the environment be a combination of web server, file server, and database server. SQL Server cannot be installed on the web server, and a large number
The upload and bcp. rll files are copied to the web server. The following files are stored in the compant folder of the project:
Using System;
Using System. Data;
Using System. Data. SqlClient;
Using System. Diagnostics;
Code
Private void Page_Load (object sender, System. EventArgs e)
{
// Place user code here to initialize the page
Process p = new Process ();
P. StartInfo. FileName = Server. MapPath ("compant/bcp.exe ");
P. StartInfo. UseShellExecute = false;
// @ Must be added. Otherwise, special characters will be automatically filtered out.
P. StartInfo. Arguments = @ "Test .. BcpTest in D: emp.txt-S-Usa-P1-c-t ,";
Try
{
P. Start ();
P. WaitForExit ();
P. Close ();
}
Catch
{}
}
Http://cndsn.cnblogs.com/archive/2006/05/22/406279.html