WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

WinInet
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

iOptionSet Error

Keywords: 	 iOptionSet

Question:

I keep receiving a return code of ERROR when I attempt to set the username and password with the function iOptionSet, I can set the connect_timeout with success. My code (with debugger results)looks like this:
tophandle=iBegin(2,"","") 
(18396) VALUE=> 13369348

rc = iOptionSet(tophandle, "username", "usid")
(18406) VALUE=> "ERROR"

if rc == @TRUE then rc = iOptionSet(tophandle, "password", "pswd")
(18406) ==>FALSE=> (skipped)

connecthandle = iHostConnect(tophandle,Host,ConnectType,"","")
(18416) VALUE=> 13369352
My process still completes successfully but I am curious as to why I cannot set the username and password.

Answer:

I suspect you cannot assign a userid and passowrd to the tophandle. Move the code down and assign it to the connectionhandle.
Article ID:   W14343
Filename:   iOptionSet Error.txt
File Created: 2017:07:28:13:58:48
Last Updated: 1999:11:02:12:32:14