Sign in to follow this  
Followers 0
speedy6

sql error

6 posts in this topic

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

thx

And another question?

I can't get parsed this function...why?

Func _close()

TraySetState(2);

Opt("TrayIconHide", 1);

exit

EndFunc

Share this post


Link to post
Share on other sites

Func _close()
  TraySetState(2)
  Opt("TrayIconHide", 1)
  exit
EndFunc

It's not Pascal so no need to have ; at end of lines :-)

Now thats not the solution... can I call the function exit in a function?

Share this post


Link to post
Share on other sites

problem solved

Share this post


Link to post
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
Sign in to follow this  
Followers 0