I have tried to import the data by SSMS > right-click Database > tasks > Import data > and so on. And it imports the required tables once and then I query to insert the source table into the destination one. like:
*INSERT INTO [ASW-Core-Shop].[dbo].[CasterHeats] ([HeatIndex], [CastSize], [Instructions])
SELECT SRC.HeatNo, SRC.CastSize, NULL
FROM tblCastSetup AS SRC
WHERE dbo.udf_HeatIndex(SRC.HeatNo) NOT IN (
SELECT HeatIndex FROM CasterHeats)*
But the problem is: Every now or then, new record gets created in MS Access database. So, I want this process to automate itself. I am using VB.NET in .Net Framework (windows form) and SQL connection con.
I have already connected the DataSource option in Visual Studio to MS Access db file but I do not know how to query the table name and its data from a DataTable.
I have tried like this but in vain:
*"INSERT INTO [ASW-Core-Shop].[dbo].[CasterHeats] ([HeatIndex], [CastSize], [Instructions])
SELECT SRC.HeatNo, SRC.CastSize, NULL
FROM **" & ASWCasterHeatsDataSet.tblCastLogDataTable & "** AS SRC
WHERE dbo.udf_HeatIndex(SRC.HeatNo) NOT IN (
SELECT HeatIndex FROM CasterHeats)"*
All in All, I want the system (VB.NET) to automatically run this SQL query without any error.
