Showing posts with label upon. Show all posts
Showing posts with label upon. Show all posts

Wednesday, March 28, 2012

How to change the caption of parameter at run time

Hi,
I would like to change the caption of parameter based upon the other
parameter value in RS 2000 / 2005.
Thankstry using conditional logic
eg
=iif(Parameters!FieldName.Value = testvalue, value if true , value if
false)|||oops posted to wrong thread - sorry
andygadget wrote:
> try using conditional logic
> eg
> =iif(Parameters!FieldName.Value = testvalue, value if true , value if
> false)

Monday, March 12, 2012

How to capture error upon connect error?

I would like to continue processing when a connect error occurs.

Set oServer = CreateObject("SQLDmo.SqlServer")
oServer.LoginSecure = True
oServer.Connect oName

Would like to continue if the connect fails rather than have the script fail. How do I do that?

Thanks!

Add a Try-Catch construct to your code:

Try
oServer = CreateObject("SQLDmo.SqlServer")
oServer.LoginSecure = True
oServer.Connect(oName)
Catch ex As Exception
MsgBox(ex.Message)
End Try

How to capture error upon connect error?

I would like to continue processing when a connect error occurs.

Set oServer = CreateObject("SQLDmo.SqlServer")
oServer.LoginSecure = True
oServer.Connect oName

Would like to continue if the connect fails rather than have the script fail. How do I do that?

Thanks!

Add a Try-Catch construct to your code:

Try
oServer = CreateObject("SQLDmo.SqlServer")
oServer.LoginSecure = True
oServer.Connect(oName)
Catch ex As Exception
MsgBox(ex.Message)
End Try