9 Aug 2012 03:53
Syntax help for IF after a Try statement
rocko <sunblaster5 <at> gmail.com>
2012-08-09 01:53:10 GMT
2012-08-09 01:53:10 GMT
Trying to get a message.info to display when a successful connection
to a database is made.
Tried using an 'Else If' after a 'Try $hConn.Open' statement
but that gives an error.
So tried a simple 'If' but I'm not sure how the syntax should be.
CODE:
Try $hConn.Open
If Error Then Print "Database cannot be opened. Error = ", Error.Text
If $hConn.Open Then
Message.Info("You are now connected to the database.")
Endif
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
RSS Feed