diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-08-02 16:22:42 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-08-02 16:22:42 +0000 |
commit | 8bc698d949e853114d65759b3db56634bc4b14d4 (patch) | |
tree | c929717628ef8bb3fc67f99be6a362c43352b7a1 /wizards/source/formwizard/DBMeta.xba | |
parent | 560c51f2a7dd18c05b1b49500bd48b7c0aa8044c (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.xba | 53 |
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 ' bStartUp = false ' Exit Sub ' End Sub - If Ubound(DialogModel.lstDatabases.SelectedItems()) > -1 Then - DeleteFirstListBoxEntry("lstDatabases", sSelectDatasource) - ToggleDatabasePage(False) - DBIndex = DialogModel.lstDatabases.SelectedItems(0) - With DialogModel - If DBIndex > -1 Then - sDBName = DlgFormDB.getControl("lstDatabases").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()) ' 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 +' Else +' DialogModel.lstTables.StringItemList = Array(sSelectDBTable) +' EmptyFieldsListboxes() +' 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 +' If Not oDBContext.hasbyName(sDBName) Then +' GetConnection() = False +' Exit Function +' End If If Not oDataSource.IsPasswordRequired Then oDBConnection = oDBContext.GetByName(sDBName).GetConnection("","") 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() |