You really need to try to understand <i>your</i> code.
This: “An error occured while uploading Image…” is a message from <i>your </i>application.
It is being displayed because the Doc2SQLServer function returned false, and it is returning false because some error occurred and was caught by the exception handler (in a very bad way, because it does nothing with the error but return false, denying the posibility to see what the error was).
Chances are that you are not successfully connecting to the database, but you will never know until you run your application in debug mode, or put some debug messages in it.
I would also temporarily remove the exception handling code, to be able to see the error messages generated when running the form.
One last thing: May I ask why you were doing something similar a few days ago using C#, and now you are doing almost the same thing but using VB ? (just curious).