This script is to import vbgallery content to photopost pro. It has nothing to do with vb4 so not sure what thats all about.
anyway your error tells me you have not put the correct vbgallery database information to obtain a successful import check your vbgallery table prefix and database info.
A gallery button on your vb4 is a hack or mod as that deals with vb4 not our application. You can try this