Dim Date1 As Date = Date.Today
Dim Insert As String
Dim Insert2 As String
Insert = "INSERT INTO HistoryPro_RePort VALUES[Date]='" & Date1 & "'"
Insert2 = "INSERT INTO HistoryPro_Report (Code_Tag,Pro_No,Count_Scan)"
Insert2 &= "SELECT (Code_Tag,Pro_No,Count_Scan) "
Insert2 &= "FROM Products_CodeTag"
With myConn
If .State = ConnectionState.Open Then .Close()
.ConnectionString = StrConn
.Open()
End With
Dim com As New SqlCommand
With com
.CommandType = CommandType.Text
.CommandText = Insert
.Connection = myConn
.ExecuteNonQuery()
End With