This is my code :
string sqllaydl = @"BULK INSERT dbo.Infosp1 FROM '@laydl' WITH (FIELDTERMINATOR = ',',ROWTERMINATOR = '\n')";
SqlCommand cmd = new SqlCommand(sqllaydl, con);
SqlParameter para = new SqlParameter();
para.ParameterName = "@laydl";
para.Value = txblink.Text;
cmd.Parameters.Add(para);
cmd.ExecuteNonQuery();
MessageBox.Show("Đã lấy DL", "Thông báo");
Hienthi();
The value of @laydl
when I insert from form is
D:\test.txt
But when I used debug, the value has two backslashes \\
.
D:\\test.txt
So, I couldn't have a link to insert data, help me!