Skip to content

Commit

Permalink
added error message when database does not exist / cannot be opened
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Wald committed Mar 7, 2018
1 parent b2a0940 commit 8ff6d3a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Demo/Demo.bbj
Expand Up @@ -86,7 +86,7 @@ return
loadTables:
lb_tbl!.removeAllItems()
db$ = lb_db!.getSelectedItem()
sqlopen (1)db$
sqlopen (1,err=no_db)db$
x$=sqltables(1)
sqlclose(1)
j=0
Expand All @@ -103,6 +103,10 @@ loadTables:
lb_tbl!.selectIndex(j)
return

no_db:
a=msgbox("Database "+db$+" does not exist!",16,"Error")
return

doQuery:
db$ = lb_db!.getSelectedItem()
tbl$ = lb_tbl!.getSelectedItem()
Expand Down

0 comments on commit 8ff6d3a

Please sign in to comment.