I try to use SQL Server bcp
utility in Visual C# like this:
command = new SqlCommand ("bcp "+ onlineConnect.Database+".dbo.T1 out "+ ConfigurationManager.AppSettings ["caleonline"]+"T1.dat -n -S " + onlineConnect.DataSource+" -U sa -P a" ,onlineConnect );
When I run it with breakpoints I get this:
CommandText
"bcp ONLINE.dbo.T1 out H:\\ONLINE\\fisiere\\T1.dat -n -S ATTY\\SQLEXPRESS -U sa -P a"
but I get an error:
System.Data.SqlClient.SqlException was unhandled Message=Incorrect syntax near '.'.