summaryrefslogtreecommitdiff
path: root/wizards/source/formwizard/DBMeta.xba
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-08-02 16:22:42 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-08-02 16:22:42 +0000
commit8bc698d949e853114d65759b3db56634bc4b14d4 (patch)
treec929717628ef8bb3fc67f99be6a362c43352b7a1 /wizards/source/formwizard/DBMeta.xba
parent560c51f2a7dd18c05b1b49500bd48b7c0aa8044c (diff)
INTEGRATION: CWS insight01 (1.30.116); FILE MERGED
2004/07/07 08:46:41 bc 1.30.116.1: ##Formwizard now also works with unregistered datasources
Diffstat (limited to 'wizards/source/formwizard/DBMeta.xba')
-rw-r--r--wizards/source/formwizard/DBMeta.xba53
1 files changed, 23 insertions, 30 deletions
diff --git a/wizards/source/formwizard/DBMeta.xba b/wizards/source/formwizard/DBMeta.xba
index d83e6cf6f..f4ac2bbb7 100644
--- a/wizards/source/formwizard/DBMeta.xba
+++ b/wizards/source/formwizard/DBMeta.xba
@@ -36,7 +36,7 @@ Dim sDatabaseList()
End Function
-Sub GetSelectedDBMetaData()
+Sub GetSelectedDBMetaData(sDBName as String)
Dim OldsDBname as String
Dim DBIndex as Integer
Dim LocList() as String
@@ -44,33 +44,27 @@ Dim LocList() as String
&apos; bStartUp = false
&apos; Exit Sub
&apos; End Sub
- If Ubound(DialogModel.lstDatabases.SelectedItems()) &gt; -1 Then
- DeleteFirstListBoxEntry(&quot;lstDatabases&quot;, sSelectDatasource)
- ToggleDatabasePage(False)
- DBIndex = DialogModel.lstDatabases.SelectedItems(0)
- With DialogModel
- If DBIndex &gt; -1 Then
- sDBName = DlgFormDB.getControl(&quot;lstDatabases&quot;).getSelectedItem()
- If GetConnection(sDBName) Then
- If GetDBMetaData() Then
- LocList() = AddListToList(Array(sSelectDBTable), TableNames())
- .lstTables.StringItemList() = AddListToList(LocList(), QueryNames())
+ ToggleDatabasePage(False)
+ With DialogModel
+ If GetConnection(sDBName) Then
+ If GetDBMetaData() Then
+ LocList() = AddListToList(Array(sSelectDBTable), TableNames())
+ .lstTables.StringItemList() = AddListToList(LocList(), QueryNames())
&apos; bSelectContent = True
- .lstTables.SelectedItems() = Array(0)
- iCommandTypes() = CreateCommandTypeList()
- EmptyFieldsListboxes()
- End If
+ .lstTables.SelectedItems() = Array(0)
+ iCommandTypes() = CreateCommandTypeList()
+ EmptyFieldsListboxes()
End If
- bEnableBinaryOptionGroup = False
- .lstTables.Enabled = True
- .lblTables.Enabled = True
- Else
- DialogModel.lstTables.StringItemList = Array(sSelectDBTable)
- EmptyFieldsListboxes()
End If
- ToggleDatabasePage(True)
- End With
- End If
+ bEnableBinaryOptionGroup = False
+ .lstTables.Enabled = True
+ .lblTables.Enabled = True
+&apos; Else
+&apos; DialogModel.lstTables.StringItemList = Array(sSelectDBTable)
+&apos; EmptyFieldsListboxes()
+&apos; End If
+ ToggleDatabasePage(True)
+ End With
End Sub
@@ -84,10 +78,10 @@ Dim Nulllist()
oDBConnection.Dispose()
End If
oDataSource = oDBContext.GetByName(sDBName)
- If Not oDBContext.hasbyName(sDBName) Then
- GetConnection() = False
- Exit Function
- End If
+&apos; If Not oDBContext.hasbyName(sDBName) Then
+&apos; GetConnection() = False
+&apos; Exit Function
+&apos; End If
If Not oDataSource.IsPasswordRequired Then
oDBConnection = oDBContext.GetByName(sDBName).GetConnection(&quot;&quot;,&quot;&quot;)
GetConnection() = True
@@ -115,7 +109,6 @@ Dim Nulllist()
Loop Until bExitLoop
On Local Error Goto 0
If Not bGetConnection Then
- DialogModel.lstDatabases.SelectedItems() = Array(sSelectDatasource)
DialogModel.lstTables.StringItemList() = Array(sSelectDBTable)
DialogModel.lstFields.StringItemList() = NullList()
DialogModel.lstSelFields.StringItemList() = NullList()