sql - Run VB Application in Windows Task Scheduler -


i have application have function same dts (transfer data as400 sql server). need application run according schedule made. application runs if open it, if put in task scheduler, shows error:

error [hy000][ibm][system access odbc driver]missing system name needed connection.

this script use make connection as400. runs without error if run (not in scheduler). know how fix it?

public sub takeconnectionas400()     _inifile.baca("config.ini", "as400")     system = _inifile.system     uid = _inifile.uid     pwd = _inifile.pwd     dbq = _inifile.dbq     db_as = "driver={client access odbc driver (32-bit)};system=" & system & ";uid=" & uid & ";pwd=" & pwd & ";dbq=" & dbq & ""     conn_as = new odbcconnection(db_as)     try         if conn_as.state = connectionstate.closed             conn_as.open()         end if     catch ex exception         msgbox(err.description, msgboxstyle.critical, "error")     end try end sub 

your program dont found ini file, or inifile not contain connexion informations. try put inifile in same directory of exe, else try write directly connexionstring program test.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -