Access2Base - Add Location to Database object

File location is known by URL property for non-registered databases
Effective Location now available for all databases

Change-Id: If1551f2644c82dbb4a4128c647810aa6a755f1ab
This commit is contained in:
Jean-Pierre Ledure 2018-08-25 18:00:23 +02:00
parent 8ecf5e1815
commit 8ff357981f
3 changed files with 3 additions and 0 deletions

View file

@ -1329,6 +1329,7 @@ Const cstThisSub = "OpenDatabase"
If UCase(sDbNames(i)) = UCase(pvDatabaseURL) Then
sDatabaseURL = sDbNames(i)
Set oBaseSource = oBaseContext.getByName(sDatabaseURL)
odbDatabase.Location = oBaseContext.getDatabaseLocation(sDbNames(i))
bFound = True
Exit For
End If

View file

@ -22,6 +22,7 @@ Private Title As String
Private Document As Object ' com.sun.star.comp.dba.ODatabaseDocument or SwXTextDocument or ScModelObj
Private Connection As Object ' com.sun.star.sdbc.drivers.OConnectionWrapper or com.sun.star.sdbc.XConnection
Private URL As String
Private Location As String ' Different from URL for registered databases
Private _ReadOnly As Boolean
Private MetaData As Object ' interface XDatabaseMetaData
Private _RDBMS As Integer ' DBMS constants

View file

@ -363,6 +363,7 @@ Const cstProgressMeterLimit = 100
Utils._updateResultSetColumnValue(iRDBMS, oOutput.RowSet, i + 1, vField)
End If
Next i
If oOutput.RowSet.IsNew And oOutput.RowSet.IsModified Then oOutput.RowSet.insertRow()
oOutput._EditMode = dbEditNone
lInputRecs = lInputRecs + 1