I checked the reference link there is Problem in Trigger. As data is insert in Content table but trigger is created on Insert of Profile table so trigger will work on insert of Profile table not For Insert on Content table. So you just need to change In Trigger definition it will work fine. Refer the modified Sample For your reference as from same link which you have shared.
SQL
CREATE TRIGGER [dbo].[updatedeliverydate] ON [dbo].[Content]
AFTER INSERT
AS
BEGIN
DECLARE @UserId INT;
DECLARE @cur CURSOR
SET @cur = CURSOR FOR SELECT i.UserId FROM inserted i
OPEN @cur
FETCH NEXT FROM @cur INTO @UserId
WHILE @@FETCH_STATUS = 0
BEGIN
UPDATE PROFILE
SET LastDeliveryDate = GETUTCDATE()
WHERE UserId=@UserId
FETCH NEXT FROM @cur INTO @UserId --fetch next record
END
END
GO
C#
string conn = ConfigurationManager.ConnectionStrings["ConStr"].ToString();
SqlConnection con = new SqlConnection(conn);
con.Open();
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[4] { new DataColumn("Id", typeof(int)), new DataColumn("Title", typeof(string)), new DataColumn("Text", typeof(string)), new DataColumn("UserId", typeof(int)) });
dt.Rows.Add(1, "Title 1", "Text 1", 1);
dt.Rows.Add(2, "Title 2", "Text 2", 2);
dt.Rows.Add(3, "Title 3", "Text 3", 3);
dt.Rows.Add(4, "Title 4", "Text 4", 4);
SqlBulkCopy copy = new SqlBulkCopy(conn, SqlBulkCopyOptions.FireTriggers);
copy.DestinationTableName = "Content";
copy.WriteToServer(dt);
con.Close();
VB.Net
Dim conn As String = ConfigurationManager.ConnectionStrings("ConStr").ToString()
Dim con As New SqlConnection(conn)
con.Open()
Dim dt As New DataTable()
dt.Columns.AddRange(New DataColumn(3) {New DataColumn("Id", GetType(Integer)), New DataColumn("Title", GetType(String)), New DataColumn("Text", GetType(String)), New DataColumn("UserId", GetType(Integer))})
dt.Rows.Add(1, "Title 1", "Text 1", 1)
dt.Rows.Add(2, "Title 2", "Text 2", 2)
dt.Rows.Add(3, "Title 3", "Text 3", 3)
dt.Rows.Add(4, "Title 4", "Text 4", 4)
Dim copy As New SqlBulkCopy(conn, SqlBulkCopyOptions.FireTriggers)
copy.DestinationTableName = "Content"
copy.WriteToServer(dt)
con.Close()
Screenshot
After Data Insert