Sub OnLButtonDown(Byval Item, Byval Flags, Byval x, Byval y) Dim sSql Dim sCom Dim ORS Dim COnn Dim oCOM Dim CON Dim date1 Dim date2 date1=HMIRuntime.TAGS("newtag1").Read date2=HMIRuntime.TAGS("newtag2").Read con="Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=FalSE;Initial Catalog=SQL_wincc;Date soure=2014-20180421NZ\wincc" Set conn=Createobject("ADODB.Connection") conn.ConnectionString=con conn.cursorLocation=3 conn.open SSql="insert into Table_5 values('"& date1 &"','"& date2 &"');" Set oRS=Createobject("ADODB.Recordset") Set oCom=Createobject("ADODB.Command") Set oCom.ActiveConnection=conn oCom.CommandType=1 oCom.CommandText=SSql Set oRs=oCom.Execute Set oRS=Nothing conn.close Set conn=Nothing End Sub