Hi,
I use this BCP command in a SP and get the same user login error.
I use widows Auth when connecting but have tried SQL server auth as well with the same error.
SP Part is as follows:
...
begin
set @cmd = 'bcp.exe ' +
@dbName + '..' + @tbName + ' in ' +
@filePath + ' -c -U ' + @usr +
' -P ' + @pwd + ' -t ' + @sep
print @cmd --+ '...'
exec xp_cmdShell @cmd
end
and my call to this would be...
Exec uSp_Import_Table 'SampleDB',
'INV_StageTable',
'c:\Test\Aut_2014-04-22.csv',
',',
'MyUserName',
'MyPassword'
and still get the same error.
any ideas?