SQL Update und Kopie nach Suben für Bestellungen

This commit is contained in:
ms
2023-01-12 09:30:46 +01:00
parent 1fd9bfb412
commit 9b4f200684
8 changed files with 59 additions and 7 deletions

View File

@@ -121,12 +121,32 @@ Public Class Form1
' MsgBox("p")
Silent = True
bntUploadAndClose.PerformClick()
Case "/sql"
Silent = True
sqlsendinator()
End Select
Next
End Sub
Public Function sqlsendinator()
Gastro.cListe.selectDBConnection("SQLGuide01")
Dim sql As New Gastro.cSQL
Dim Upload2SQLGuide As String = "INSERT INTO [SQLGUIDE01.verag.ost.dmn].[AVISO].dbo.[tblEBMenu]
Select * from [192.168.2.17].[Gastro].dbo.[GMenu] as table1
WHERE NOT EXISTS (
select * from [SQLGUIDE01.verag.ost.dmn].[AVISO].dbo.[tblEBMenu] as table2 WHERE table1.MenuTitel = table2.MenuTitel AND table1.[MenuDateVon] = table2.[MenuDateVon]
)
"
sql.SqlQuery(Upload2SQLGuide)
Close()
End Function
Public Function sendMail(subject As String, body As String)
Try
Dim Smtp_Server As New SmtpClient
@@ -152,4 +172,9 @@ Public Class Form1
MsgBox(error_t.ToString)
End Try
End Function
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
sqlsendinator()
End Sub
End Class