summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorBehrend Cornelius <bc@openoffice.org>2001-06-22 14:05:32 +0000
committerBehrend Cornelius <bc@openoffice.org>2001-06-22 14:05:32 +0000
commit94ac009360a15114db90453638137d5ba2a9db1c (patch)
tree445441a07cd64be582c0a28eea7fc2aa9bb752d8 /wizards
parent3993ff75f12cfbb489067ba8409104235a8ea59d (diff)
#88615# Error in DB Connection corrected
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/formwizard/DBMeta.xba17
1 files changed, 16 insertions, 1 deletions
diff --git a/wizards/source/formwizard/DBMeta.xba b/wizards/source/formwizard/DBMeta.xba
index 92cda5d69298..d4abc3974662 100644
--- a/wizards/source/formwizard/DBMeta.xba
+++ b/wizards/source/formwizard/DBMeta.xba
@@ -46,6 +46,7 @@ Dim oDataSource as Object
Dim bExitLoop as Boolean
Dim bGetConnection as Boolean
Dim iMsg as Integer
+Dim Nulllist()
oDatabase = oDBContext.GetByName(sDBName)
If Not oDatabase.IsPasswordRequired Then
oDBConnection = oDBContext.GetByName(sDBName).GetConnection(&quot;&quot;,&quot;&quot;)
@@ -59,12 +60,26 @@ Dim iMsg as Integer
oDBConnection = oDataSource.ConnectWithCompletion(oInteractionHandler)
NOCONNECTION:
bGetConnection = Err = 0
+ If bGetConnection Then
+ bGetConnection = Not IsNull(oDBConnection)
+ If Not bGetConnection Then
+ Exit Do
+ End If
+ End If
If Not bGetConnection Then
iMsg = Msgbox (sMsgNoConnection,32 + 2, sMsgWizardName) &apos; &apos;?&apos; &amp; &apos; Repeat and Cancel&apos;
bExitLoop = iMsg = SBCANCEL
+ Resume CLERROR
+ CLERROR:
End If
- On Local Error Goto 0
Loop Until bExitLoop
+ On Local Error Goto 0
+ If Not bGetConnection Then
+ oDialogModel.lstDatabases.SelectedItems() = Nulllist()
+ oDialogModel.lstTables.StringItemList() = NullList()
+ oDialogModel.lstFields.StringItemList() = NullList()
+ oDialogModel.lstSelFields.StringItemList() = NullList()
+ End If
GetConnection() = bGetConnection
End If
End Function