From 77c20440d8c59516c94e75f6892919053d3e3384 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Tue, 4 Sep 2018 16:42:01 +0200 Subject: [PATCH] Add Property DatabaseName to Firebird class --- Modules.Database/Firebird.vb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Modules.Database/Firebird.vb b/Modules.Database/Firebird.vb index 82a4d3f3..c648695b 100644 --- a/Modules.Database/Firebird.vb +++ b/Modules.Database/Firebird.vb @@ -1,6 +1,6 @@ Imports NLog Imports FirebirdSql.Data.FirebirdClient - +Imports System.Text.RegularExpressions ''' ''' MODULE: Firebird @@ -55,6 +55,15 @@ Public Class Firebird Public ReadOnly Property ConnectionEstablished As Boolean Public ReadOnly Property ConnectionFailed As Boolean Public ReadOnly Property ConnectionString As String + Public ReadOnly Property DatabaseName As String + Get + Dim oRegex As New Regex("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:") + Dim oPath As String = oRegex.Replace(_connectionDatabase, "") + Dim fi As New IO.FileInfo(oPath) + Return fi.Name + End Get + End Property + ''' '''