Hi,
I've tried several hours on internet for this but couldn't find a decent solution, could someone here point me in the right direction?
I have a little piece of code to loop thru worksheets to receive data from different tables:
The above code wroks fine, it's just I want to improve the code :
1. occastionally the typo in the password easilly causes the user id revoked at the remote system, so I'm just wondering if i can add one more step before the loop ( For j = 1 To tn ), to test the user id & password, if something wrong then exit the macro with the message box. Is there a easy way to test the connection without actaully execute a query ?
2. Is it possible to capturet the SQLCODE or SQLSTATE after each SQL gets executed?
Thank you very much !
Jack
Bookmarks