changes
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
Imports System.Net
|
Imports System.Data.SqlClient
|
||||||
|
Imports System.Net
|
||||||
Imports System.Text
|
Imports System.Text
|
||||||
Imports System.Windows.Forms
|
Imports System.Windows.Forms
|
||||||
|
|
||||||
@@ -31,6 +32,41 @@ Public Class cTimasAPI
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Public Function loadDgvBySql(ByVal sql As String, Optional conn_art As String = "SDL", Optional timeout As Integer = 0, Optional showerror As Boolean = True) As DataTable
|
||||||
|
Try
|
||||||
|
Dim myTable = New DataTable()
|
||||||
|
Dim conn As New SqlConnection
|
||||||
|
Select Case conn_art
|
||||||
|
|
||||||
|
Case "ADMIN"
|
||||||
|
conn.ConnectionString = "Data Source=SQLGUIDE01.verag.ost.dmn;Initial Catalog=ADMIN;Integrated Security=false;User ID=AppUser;Password=yp/THDd?xM+pZ$"
|
||||||
|
conn.Open()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Case "AVISO_ATILLA"
|
||||||
|
conn.ConnectionString = "Data Source=172.16.0.98;Initial Catalog=AVISO_ATILLA;Integrated Security=false;User ID=sa;Password=BmWr501956;Pooling=true;Min Pool Size=5;Max Pool Size=200"
|
||||||
|
conn.Open()
|
||||||
|
End Select
|
||||||
|
' MsgBox(cAllgemein.TESTSYSTEM)
|
||||||
|
' Using conn As SqlConnection = cSqlDb.GetNewOpenConnection()
|
||||||
|
Using cmd As New SqlCommand(sql, conn)
|
||||||
|
If timeout > 0 Then cmd.CommandTimeout = timeout 'Seconds
|
||||||
|
Dim dr As SqlDataReader = cmd.ExecuteReader()
|
||||||
|
|
||||||
|
myTable.Load(dr)
|
||||||
|
dr.Close()
|
||||||
|
End Using
|
||||||
|
conn.Close()
|
||||||
|
' End Using
|
||||||
|
Return myTable 'While Schleife wird hier verlassen
|
||||||
|
Catch ex As Exception
|
||||||
|
If showerror Then VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name, , "WiedergestellungsDatum Fehler", , , sql)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Nothing
|
||||||
|
|
||||||
|
End Function
|
||||||
Public Function checkConnectionTImas(ByRef failureText As String) As Boolean
|
Public Function checkConnectionTImas(ByRef failureText As String) As Boolean
|
||||||
Try
|
Try
|
||||||
Dim success As Boolean
|
Dim success As Boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user