Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Prevent automatically displaying error messages. (Read 5885 times)
Ian
YaBB Newbies
*




Posts: 2
Prevent automatically displaying error messages.
24.10.05 at 12:17:14
 
How can I stop SQL XL from automatically displaying connection error Messages ? As I want to control when user get mesages and the format of the messages.
 
Regards
 
Ian
Back to top
 
« Last Edit: 31.10.05 at 10:04:40 by Gerrit-Jan Linker »  
Email   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: How can I stop SQL XL from automatically displ
Reply #1 - 24.10.05 at 12:35:05
 
You can do this through SQL*XL's error handler. I have just added the API reference information to the help pages at:
http://www.oraxcel.com/projects/sqlxl/help/vba/SQLXL/literr/index.html
 
You can use the DisplayAlerts property to control if messages are displayed or not. It is suggested to always leave it to True at all times.  
 
The logging facility that logs errors to the windows event log will not be affected by this. It will just control whether the error and alert messages are displayed or not.
 
Example:
 
SQLXL.LITErr.DisplayAlerts = False
'Do some work where you don't want to see any error messages
SQLXL.LITErr.DisplayAlerts = True
'Now the error messages are displayed again
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Ian
YaBB Newbies
*




Posts: 2
Re: How can I stop SQL XL from automatically displ
Reply #2 - 24.10.05 at 14:50:08
 
Tried what you suggeted but the error message is still displayed.  What I trying to do is automatically connect to the database if the database is up and the laptop is connected to the network.  
 
The error I am trying to trap is ORA-12505 TNS-listener could not resolve SID
Back to top
 
 
Email   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: How can I stop SQL XL from automatically displ
Reply #3 - 24.10.05 at 15:36:30
 
You are right. I tried it also and it still displays the error message.  
 
I have found out what the problem is and will post a fix in SQL*XL 4.0.25. SQL*XL handles connection errors as unexpected errors.  These are always displayed irrespective the DisplayAlerts setting. The confusion on my part is that I can switch even unexpected errors off internally using the same syntax.
 
When I put the new version on the website I will announce it in the forums.
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1