Modules.Database

This commit is contained in:
Digital Data - Marlon Schreiber
2018-08-16 15:27:46 +02:00
parent f8e3b3628e
commit b8c28b516c
12 changed files with 427 additions and 64 deletions

View File

@@ -1,22 +1,22 @@
Imports System.IO
Imports DD_FirebirdDLL
Imports Modules.Database
Public Class ClassInit
Public Shared Function Init_user()
Try
USER_USERNAME = Environment.UserName
Dim sql = String.Format("select FNGET_USER_ACCESS('edm','{0}') from rdb$database", USER_USERNAME)
Dim result = ClassDBFirebird.ExecuteScalar(sql, LOGGERFilePath)
'Dim result = Firebird.ExecuteScalar(sql, LOGGERFilePath)
sql = String.Format("SELECT * FROM VW_TBEDM_USER WHERE UPPER(LOGIN_NAME) = UPPER('{0}')", USER_USERNAME)
DT_USER = ClassDBFirebird.ReturnDatatable(sql, LOGGERFilePath)
If Not IsNothing(result) Then
If Not IsNothing(DT_USER) Then
USER_LANGUAGE = DT_USER.Rows(0).Item("LANGUAGE")
End If
Return result
Else
Return False
End If
'sql = String.Format("SELECT * FROM VW_TBEDM_USER WHERE UPPER(LOGIN_NAME) = UPPER('{0}')", USER_USERNAME)
'DT_USER = ClassDBFirebird.ReturnDatatable(sql, LOGGERFilePath)
'If Not IsNothing(result) Then
' If Not IsNothing(DT_USER) Then
' USER_LANGUAGE = DT_USER.Rows(0).Item("LANGUAGE")
' End If
' Return result
'Else
' Return False
'End If
Catch ex As Exception
End Try