Jump to content

sql error


Recommended Posts

Hi,

In the following code i make a connection to my database and it works fine BUT

when i zet my firewall on BLOCK ALL. I get a error on the following line:

$Objconn.open ("DRIVER=" & $sDriver & ";SERVER=" & $sServer & ";DATABASE=" & $sDatabase & ";UID=" & $sUsername & ";PWD=" & $sPassword & ";")

I cannot catch it with the following code...so how can I solve it?

$Objconn.open ("DRIVER=" & $sDriver & ";SERVER=" & $sServer & ";DATABASE=" & $sDatabase & ";UID=" & $sUsername & ";PWD=" & $sPassword & ";")

If @error Then

SetError(1)

Return 0

Else

...

Thanks

Speedy

Link to comment
Share on other sites

$objErr = ObjEvent("AutoIt.Error","MyErrFunc")

Func MyErrFunc()
    ; when COM error occurs only set @error flag and continue
    SetError(1)
EndFunc

$Objconn.open ("DRIVER=" & $sDriver & ";SERVER=" & $sServer & ";DATABASE=" & $sDatabase & ";UID=" & $sUsername & ";PWD=" & $sPassword & ";")
If @error Then 
  ; ...
EndIf

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...