0
我正在將舊的VB6應用程序轉換爲Vb.net應用程序。只是想知道有沒有在vb.net中檢查isSysAdimin?IsSysAdmin在vb.net上?
**VB6 code:**
Set oSQL = New SQLServer
oSQL.LoginSecure = True
oSQL.Connect "" & "xxxxxxx"
If oSQL.Issysadmin Then DBA = True
**VB.Net code:**
Dim srvConn As New ServerConnection()
srvConn.ServerInstance = "" & "xxxxxxx"
srvConn.LoginSecure = True
Dim oSQL As New Server(srvConn)
If oSQL.IsSysAdmin? Then DBA = True